Closed Bug 2992 Opened 26 years ago Closed 26 years ago

percentage values on top and bottom

Categories

(Core :: Layout, defect, P2)

x86
Windows 95
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: dbaron, Assigned: troy)

References

()

Details

Percentage values on the top (and bottom?) properties don't work with relative positioning (and absolute positioning??) when the height of the containing block is auto. See the <P class="two"> in the above URL. The relative positioning works if I stick style="height: 200px" in its containing DIV.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
I'm doing what the CSS2 spec says in this respect. Their behavior is different for 'top' and 'bottom' than for 'margin-top' and 'margin-bottom' (for example), where the height is always based on the containing block width According to 9.3.2: <percentage> The offset is a percentage of the containing block's width (for 'left' or 'right') or height (for 'top' and 'bottom'). For 'top' and 'bottom', if the height of the containing block is not specified explicitly (i.e., it depends on content height), the percentage value is interpreted like 'auto'.
Status: RESOLVED → VERIFIED
Yup. I missed that. Verified invalid.
In the mean time CSS 2.1 has come out. It says in 9.3.2: <percentage> The offset is a percentage of the containing block's width (for 'left' or 'right') or height (for 'top' and 'bottom'). Negative values are allowed. So the bug is valid now.
Bug 260348 is the currently-open variant of this bug.
You need to log in before you can comment on or make changes to this bug.