percentage values on top and bottom

VERIFIED INVALID

Status

()

P2
normal
VERIFIED INVALID
20 years ago
4 years ago

People

(Reporter: dbaron, Assigned: troy)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

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.
(Assignee)

Updated

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → INVALID
(Assignee)

Comment 1

20 years ago
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.

Comment 3

13 years ago
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.

Comment 4

4 years ago
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.