I'm attempting to achieve a layout similar to an Instagram post, where the list expands but does not push the footer down. In my case, adding margin-bottom to the comment class affects the height of the
<div class="post-details-container">
resulting in a gap.
If I increase the margin-bottom between comments, it should expand the overflow of the <div class="body>
container without affecting other divs and causing a green gap as shown in the image.
For reference, here is a Jsfiddle example: https://jsfiddle.net/ou21qe09/2/
Adding more than 5px to the comment class causes expansion and leaves a green gap in the image container. Similarly, adding padding-top to the
<div class="header">
increases the div's height, creating the same issue. Setting a max-height on the <div class="post-details-container">
or finding another workaround may be necessary due to variations in image size determining its height.
.comment {
margin-bottom:10px;
}
Any suggestions on how to solve this problem would be greatly appreciated. If further clarification is required, please let me know!