I have two divs next to each other. Usually one will have more content in it than the other. What I'd like to achieve is that they are visibly the same height.
I've tried to achieve it using display:table-cell; and height:100%; but no luck.
.content {
background-color: tomato;
margin: 10px;
border: 3px solid black;
height: 100%; /* this seems to be being ignored */
}
.table {
display: table;
vertical-align: middle;
/*height:100%; if I do this it will also affect height of bigger div */
}
.tr {
display: table-row;
vertical-align: inherit;
height: 100%;
}
.td {
display: table-cell;
vertical-align: inherit;
width: 50%;
height: 100%;
}
html, body {
height: 100%;
}
<div class="table">
<div class="tr">
<div class="td">
<div class="content">Lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots and lots of content.</div>
</div>
<div class="td">
<div class="content">I wish I was the same height as my fellow div</div>
</div>
</div>
</div>
Any suggestions?