I want to create a two-column gallery of photos, each with a different height, and with a footer with some explanation.
I have created the two column section, a card container, and placed inside this one the image and a div with the footer.
The result in Chrome shows the last card container of the first column to be broken, i.e. separated in two: on the first column the image, on the second column the footer.
https://i.stack.imgur.com/llqoC.jpg
#columns {
line-height: 0;
display: block;
column-count: 2;
column-gap: 100px;
}
#columns .container {
width: 100% ;
height: auto ;
margin-bottom: 15px;
border-radius: 15px;
border-width: 1px;
background-color: lime;
padding: 3px;
overflow:hidden;
}
#columns img {
overflow: hidden;
}
.footer{
color: darkslategrey;
position: relative;
margin: 5px;
bottom: 0px;
right: 0px;
text-align:center;
}
<section id="columns">
<div class="container">
<img src="http://via.placeholder.com/350x150">
<div class="footer">
<img src="http://via.placeholder.com/50x50">
Footer #1
</div>
</div>
<div class="container">
<img src="http://via.placeholder.com/350x120">
<div class="footer">
<img src="http://via.placeholder.com/50x50">
Footer #2
</div>
</div>
<div class="container">
<img src="http://via.placeholder.com/350x130">
<div class="footer">
<img src="http://via.placeholder.com/50x50">
Footer #3
</div>
</div>
Help much appreciated :)