Home › Forums › CSS › Auto height not working › Reply To: Auto height not working
September 19, 2014 at 9:32 am
#183609
PrincipOfCode
Participant
Hi united9,
You can use display property in css, change to “display: table;” in the container of both divs, and for both divs declare them as “display: table-cell;”, so you also don’t need to use “float: left” or right ..
instead you can use “padding” with “box-sizing: border-box;” inside the divs and the container.
In this way you can leave “height: auto;” inside your divs … it will stretch the height of your divs to the height of the bigger of them ..