I have two divs side by side. I\'d like the height of them to be the same, and stay the same if one of them resizes. I can\'t figure this one out though. Ideas?
To c
This question was asked 6 years ago, but it's still worthy to give a simple answer with flexbox layout nowadays.
Just add the following CSS to the father The first two lines declare it will be displayed as flexbox. And display: -webkit-flex;
display: flex;
flex-direction: row;
align-items: stretch;
flex-direction: row
tells browsers that its children will be display in columns. And align-items: stretch
will meet the requirement that all the children elements will stretch to the same height it one of them become higher.