Liquid
CSS
.xxxx {
position: fixed;
bottom: 8%;
left: 50%;
}
Seems to not be centered on desktop and not centered on mobile. Tried a few ways, but this code was the best so far. ANy help would be appreciated. Thanks
Goal: center an element that “floats” (overlays) at the bottom center on both desktop and mobile.
Original setup: a div wrapping an image with CSS position: fixed; bottom: 8%; left: 50%.
Problem: element isn’t visually centered on desktop or mobile.
Suggested change: use flexbox on the wrapper (.xxxx { display: flex; justify-content: center; align-items: center; }).
Result: element becomes centered but no longer floats; it affects layout by pushing the footer, which is not desired.
Key technical context:
Outcome/Status:
Notes:
Liquid
CSS
.xxxx {
position: fixed;
bottom: 8%;
left: 50%;
}
Seems to not be centered on desktop and not centered on mobile. Tried a few ways, but this code was the best so far. ANy help would be appreciated. Thanks
Liquid
CSS
.xxxx {
display: flex;
justify-content: center;
align-items: center;
}
It is definitely center, but it’s not floating anymore. just pushes the bottom of the footer up and stays there. Need it floating.