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

Home Forums CSS Relative Positioning…thing… Re: Relative Positioning…thing…


firstly, neither element is inline-block, but that has no bearing on this matter.

The reason it is happening is that the containing element’s (#out) has no defined height – as jurotek stated. It also has no defined width, but the width can be calculated definitively even though it’s a ‘shrink to fit’ width. While the height can be computed for display purposes, it cannot be used for determining percentages – per the specs.

I don’t believe there is a CSS solution, barring giving #out a height. It would be relatively easy using javascript however.