Forums

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

Home Forums CSS Absolutely positioned children larger than their parent. Re: Absolutely positioned children larger than their parent.

#123450
DouglasMeyer
Member

Absolute positioning has been my goto for positioning elements (almost arbitrarily) within a container. Are you saying it would be better to position elements using “relative” and only use “absolute” positioning when absolutely necessary? Because, when I modify my codepen to use relative positioning for most elements, the parent LI allocates enough height for all of the relatively positioned elements (making it much larger than needed).

Or are you saying the approach I took is correct?

Thanks!