Closed Bug 109927 Opened 24 years ago Closed 22 years ago

Setting padding causes div in td to overflow into adjacent td's

Categories

(Core :: Layout: Block and Inline, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: rossb, Assigned: dbaron)

References

()

Details

(Whiteboard: [awd:tbl][p3][patch])

Attachments

(1 file, 1 obsolete file)

attached URL demonstrates the problem. setting padding-left/right to 0 in the DIVs (id="DesignDIV" and id="PropertyDIV") fixes the layout. :)ross
Over to tables for initial investigation.
Assignee: attinasi → karnaze
Status: UNCONFIRMED → NEW
Component: Layout → HTMLTables
Ever confirmed: true
QA Contact: petersen → amar
Temporarily moving to future until a milestone can be assigned.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
yeah, this is pretty apparent. i can attach a screenshot if need be.
Whiteboard: [awd:tbl][p3]
This happens when you have a single DIV also. I am adding the testcase, but here is the source: <div style="width:100px;background-color:blue">100px</div> <div style="padding-left:50px;width:100px;background-color:blue">100px</div> The second DIV have 150 pixels width. This is breaking one major bank in Brazil: From Latin America Evangelism effort.
Blocks: 167408
Blocks: 179696
This is very annoying, am trying to work around it for a while know, doesn't make it easier that IE renders it differently. I think there was a similar bug report a while back which shows that CSS2 contradicts itself in this regard. But as a web designer this is a real PITA Mozilla: width + padding = absolute width, padding values added to width IE: width = absolute width, padding just affecting inner table, as in my understanding it should.
Bug #151227 deals with the same problem but has some addiotional information. Possible duplicate?
block layout
Assignee: karnaze → block-and-inline
Status: ASSIGNED → NEW
Component: Layout: Tables → Layout: Block & Inline
QA Contact: amar → ian
Either this was fixed since 1.2.1 or I have a patch in my tree that fixes it (although I'm not sure what). Taking bug so I figure that out.
Assignee: block-and-inline → dbaron
Whiteboard: [awd:tbl][p3] → [awd:tbl][p3][patch]
Test in Mozilla 1.3.1 Final (win98) and 1.4rc3 (WinXP)
Comment on attachment 126497 [details] Padding in DIV incorrectly increases DIV width <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>PNG Test</title> <style type="text/css"> body { background-color: silver; color: black; } #main { width: 75%; border: 2px solid black; margin-left: auto; margin-right: auto; } #mainheader { width: 100%; background-color: white; padding: 10px; } #mainleft { width: 25%; float: left; background-color: red; } #maincenter { width: 50%; float: left; background-color: blue; } #mainright { width: 25%; float: left; background-color: green; } </style> </head> <body> <div id="main"> <div id="mainheader"> <p style="padding: 10px; margin: 0;"> HEADER </p> </div> <div id="mainleft">LEFT</div> <div id="maincenter">CENTER</div> <div id="mainright">RIGHT</div> </div> <p style="text-align: center; margin-top: 0.5in;"> <a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" style="border: 0;" /></a> </p> </body> </html>
Sorry, attached the wrong testcase.
Attachment #126497 - Attachment is obsolete: true
Comment on attachment 126498 [details] Padding in DIV incorrectly increases DIV width This testcase is unrelated to the bug and as far as I can tell Mozilla's layout is correct.
(And comment 4 is equally invalid. WinIE does 'width' wrong, although it's fixed in WinIE6's standards mode.)
Whatever was wrong here was fixed between 1.2.1 and 1.3.1.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: