Forums

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

Home Forums CSS How to get the actual height of a parent div? Re: How to get the actual height of a parent div?

#122361
wolfcry911
Participant

That’s correct behavior. And for the record, padding-top would also work. The child’s margin extends outside of the parent unless the parent is given a new block formatting context. You’ve hit most of the ways to do that. I personally would use the overflow: hidden;