The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS max-height as percentage issues Reply To: max-height as percentage issues



You can’t base a percentage height on a parent that has no height set otherwise the height should default to auto (content doesn’t count as height either). Also you can’t base a child’s percentage height on a parent that has min or max height set either as it must be a real height. If the parent has a percentage height then that parent’s parent must also have a height defined and so on…

Therefore the element ‘some-other-thing’ also needs a height set for this to work.


If you want nested minimum heights then use display:table with height:100% (and width:100%).