I have a row of section like so:
And I'm trying to make the second div follow the same height as the first one, notice that the height depends on the picture size, that can change. Do you have any idea?
I have a row of section like so:
And I'm trying to make the second div follow the same height as the first one, notice that the height depends on the picture size, that can change. Do you have any idea?
try using javascript to get the div height when it change
var divt= document.getElementById('myDiv').clientHeight;
and then set it to equal the other div height
If you are open to using jQuery, this is really simple. Simply give both divs the same class and then copy the following code to the bottom of your page before the </body>
and place between <script></script>
.
$(function() {
$('.myClass').matchHeight();
});
However, there are two other steps that can't be overlooked.
This is a responsive solution that will allow you to not force the height of the image and allow the height to change with a responsive page.