Closed
Bug 80002
Opened 24 years ago
Closed 24 years ago
[CSS] "width:<percentage>" is calculated as percentage of window width
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: kazhik, Assigned: pierre)
Details
Attachments
(2 files)
"width:<percentage>" is calculated as percentage of window width.
<div style="border-width: 5pt;border-style: solid; border-color: red;">
<div style="border: 10pt solid yellow; width:100%"></div>
</div>
This should be displayed as yellow square in red square.
But now yellow square is wider than red square.
| Reporter | ||
Comment 1•24 years ago
|
||
I think this bug is INVALID : let's work on reporter's test case :
<div style="border-width: 5pt;border-style: solid; border-color: red;">
<div style="border: 10pt solid yellow; width:100%"></div>
</div>
all the values of margins (initial value 0), borders, paddings (initial value 0)
and width of innermost are different from 'auto'. So according to CSS 2 spec
section 10.3.3,
the values are said to be "over-constrained" and one of the computed
values will have to be different from its specified value. If the
?direction? property has the value ?ltr?, the specified value of
?margin-right? is ignored and the value is computed so as to make the
equality true.
So the value of 'margin-right' becomes negative to allow the overflow defined
by 'width : 100%'.
Requesting Marc, David or Ian's opinion before marking this. This part of the
spec is almost cryptic and errors can be easily done ; a second opinion is
always better.
Summary: "width:<percentage>" is calculated as percentage of window width → [CSS] "width:<percentage>" is calculated as percentage of window width
Yep. Invalid. The real problem is that you really mean 'width: auto' rather
than 'width: 100%'. 'width: 100%' combined with a nonzero border makes the
border-box wider than 100% since the width property describes the content width.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•