I have image gallery with 4 images.
Images can be different height, but i need with html/css make the same height columns (images stretched).
Everything works fine, until I do not put <!DOCTYPE html>
All other page works with this DOCTYPE, so i can't remove it.
How fix my code, that it functions well with my DOCTYPE?
img {
width: 100%;
max-width: 100%;
}
.cb {
clear: both;
}
.fl {
float: left;
}
.fr {
float: right;
}
.col1 {
width: 40%;
flex-flow: column;
display: flex;
}
.col2 {
width: 60%;
}
.gallery-top {
display: flex;
}
<div class="gallery-top">
<div class="fl col1">
<div class="">
<img src="https://placeholdit.imgix.net/~text?txtsize=15&txt=150%C3%9780&w=150&h=40" />
</div>
<div class="" style="flex: 1; display: flex;">
<img src="https://placeholdit.imgix.net/~text?txtsize=15&txt=150%C3%9780&w=150&h=120" />
</div>
<div class="cb"></div>
</div>
<div class="fl col2">
<div class="">
<img src="https://placeholdit.imgix.net/~text?txtsize=15&txt=150%C3%9780&w=150&h=80" />
</div>
<div class="">
<img src="https://placeholdit.imgix.net/~text?txtsize=15&txt=150%C3%9780&w=150&h=80" />
</div>
<div class="cb"></div>
</div>
<div class="cb"></div>
</div>