Inherit height of parent doesn't work

rjmcb picture rjmcb · May 8, 2012 · Viewed 25.2k times · Source

I wanted the .cols inside .row to inherit .row's height and make the .cols be fixed inside the .row. Here's the fiddle.. http://jsfiddle.net/Hhf8R/

My idea is to make it like a table but using divs. like this : http://jsfiddle.net/hhUtb/

Answer

Thomas Jones picture Thomas Jones · May 8, 2012

in order for divs to be 100% of the height of their parent, the parent has to have a defined height.

the browser can't calculate 100%(or inherit) of something that hasn't been fully rendered yet.