How can I get a scrolling fixed image centered bottom of page for both mobile and desktop? Thanks
Hi @xnyjyh ,
You can try this way
HTML:
<div class="fixed-image-container">
<img src="your-image.jpg" alt="Fixed Image" class="fixed-image">
</div>
CSS:
<style>
body {
margin: 0;
padding: 0;
overflow-x: hidden; /* Prevent horizontal scroll */
}
.fixed-image-container {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
}
.fixed-image {
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
</style>
Hope it helps @xnyjyh