Closed
Bug 50449
Opened 24 years ago
Closed 24 years ago
Divs set to % does not hold when padding is placed on the div.
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: kidzi, Assigned: clayton)
References
Details
(Keywords: compat)
From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) BuildID: 2000082408 I have a div at 80% which displays properly. When I add padding (which should be inside the div), the 80% is not held and the box grows larger than expected. Reproducible: Always Steps to Reproduce: Run the html in the additional info section. Actual Results: Example shows with middle div extended too far. Expected Results: As netscape 4 and IE4/5 display - where the div is 80% but the padding sets the margin within the box. <html> <HEAD> <STYLE> .BoxEdge { position: relative; background-color: #FFFFFF; width: 80%; } .Text { position: relative; background-color: #FFFFFF; padding-left: 1em; padding-right: 1em; width: 80%; } </STYLE> </HEAD> <body bgcolor="#006699"> <DIV CLASS="BoxEdge"> test </DIV> <DIV class="Text"> test </DIV> <DIV CLASS="BoxEdge"> test </DIV> </body> </html>
Comment 1•24 years ago
|
||
What Mozilla is doing is correct as per the spec. This bug is invalid in terms of the strict layout mode. http://www.w3.org/TR/REC-CSS2/box.html However, I am confirming this bug and sending it over to layout for consideration whether a quirk should be implemented or whether a quirk would do more harm than good. For the record, IE 5 for Mac handles the test case according to the spec in its standards mode. In its quirks mode IE 5 for Mac does the same thing as (according to the description of this bug) Nav 4.x and IE for Windows.
Assignee: jst → clayton
Status: UNCONFIRMED → NEW
Component: DOM Level 0 → Layout
Ever confirmed: true
Keywords: compat
QA Contact: desale → petersen
Summary: Divs set to % does not hold when padding is placed on the div. → Divs set to % does not hold when padding is placed on the div.
Comment 2•24 years ago
|
||
INVALID. We support 'box-sizing' (a CSS3 property) do to what you want.
Comment 5•19 years ago
|
||
*** Bug 298332 has been marked as a duplicate of this bug. ***
Comment 6•19 years ago
|
||
This bug seems to appear again in DeerPark Alph 1
Comment 7•18 years ago
|
||
after reading http://www.w3.org/TR/REC-CSS2/box.html it seems like mozilla has a bug and don't display the DIVs correctly. for example: the content's width should be = (box's_width - padding). but we specify the box's width and padding... so we can change the content's width which is IN the box.
Comment 8•18 years ago
|
||
so how the f**k do I use box-sizing to make the stupid mozilla understand what i'm trying to do with my site using DIV tags?
Comment 9•18 years ago
|
||
*** Bug 342867 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•