I am currently working on a layout where I have utilized the position: sticky
property to position an image near the bottom right corner of the page, under a flex layout:
.footer-logo {position: sticky; bottom: 50px; z-index: 100; margin: 50px; padding: 25px; width: 100px; height: 100px; background-color: green; float: right;}
.flex-container {height: 400px; display: flex; flex-wrap: wrap; background-color: #f2f2f2; padding-top:20px; justify-content: center;}
<div class="flex-container"></div>
<img class="footer-logo" src="https://placehold.it/100x100"></img>
Although the img
is correctly positioned, there is unwanted whitespace below the flex-container
that spans the full width of the page and matches the height of the img
(including padding & margin).
I am seeking a solution to remove this whitespace while keeping the img
in its correct position. How can this be achieved?