Closed
Bug 306816
Opened 20 years ago
Closed 20 years ago
containing box width doesn't fit
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: stefan, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5
I am not sure, if this relates to bug 256261.
This html document shows different results to IE6 and Opera 8
<html><body>
<div id="w" style="width:400px; border:10px solid black; background-color:red;">
<div id="b" style="width:auto; height:20px; background-color:gray;">
</div>
<div id="c" style="height:200px; width:380px; overflow:auto;
background-color:lightgreen;">
</div>
</div>
</body></html>
Reproducible: Always
Actual Results:
The red background of the div 'w' is visible.
Expected Results:
The red background of the div 'w' shouldn't be visible.
Comment 1•20 years ago
|
||
What you expect is not correct.
From the CSS 2.1 specs ( http://www.w3.org/TR/CSS21/visudet.html#propdef-width )
the "width" property sets the width of the content area, and the content area
does *not* comprehend paddings, borders, and margins (see
http://www.w3.org/TR/CSS21/box.html#content-width )
Guido,
> What you expect is not correct.
>
> From the CSS 2.1 specs ( http://www.w3.org/TR/CSS21/visudet.html#propdef-width )
> the "width" property sets the width of the content area, and the content area
> does *not* comprehend paddings, borders, and margins (see
> http://www.w3.org/TR/CSS21/box.html#content-width )
Ok, i changed my example so that the second inner box has no border, margin and
padding width and set it's width equal to the outer box's width.
<html><body>
<div id="w" style="width:400px; border:10px solid black; background-color:red;">
<div id="b" style="width:auto; height:20px; background-color:gray;">
</div>
<div id="c" style="height:200px; width:400px; overflow:auto;
background-color:lightgreen;">
</div>
</div>
</body></html>
Now it works according to CSS 2.1.
Now IE 6 *and* Opera 8 show different results each and are obviously not CSS 2.1
conformant.
Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Comment 3•20 years ago
|
||
(In reply to comment #2)
> Now IE 6 *and* Opera 8 show different results each and are obviously not CSS 2.1
> conformant.
As far as Internet Exploder (ops ;) is concerned, you might like to read this:
http://msdn.microsoft.com/ie/default.aspx?pull=/library/en-us/dnie60/html/cssenhancements.asp
With IE7 there seems that there will be a stricter standard compliancy:
http://blogs.msdn.com/ie/search.aspx?q=CSS&p=1
You need to log in
before you can comment on or make changes to this bug.
Description
•