Closed Bug 249624 Opened 22 years ago Closed 22 years ago

Padding of a DIV inside a TABLE is modiffing the DIV's size making it exceed the size of it's containing TABLE

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: rmanrique, Assigned: bugzilla)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 In the page http://www.eluniversal.com/firefoxTest.html you'll find 2 table set up with the excact same parameters besides the padding of the inner div of the table number 2. The first one shows the table with the div inside of it correctly, but in the second the div is being drawn outside the boundaries of the table. This behaviour appears only when the div's width is set to 100% and overflow = auto. Reproducible: Always Steps to Reproduce: 1. Create a fixed width table with 1 cell 2. Put a div inside of the cell with some padding and width 100% and overflow: auto Actual Results: The div is drawn outside the boundaries of the table. Expected Results: Increase the space from the border of the div to the text inside of it and leave the size of the div and the table as set. Please visit http://www.eluniversal.com to see the bug in a more complex way, there are other problems when you try to show and hide content inside of the div with the style.display property of the DOM object.
Confirmed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
In CSS the width property refers to the content width, the box width is: border-left-width + padding-left + width + padding-right + border-right-width So Firefox is doing the right thing here by making the inner box 100% of the container + 44px wide (as would IE6 if you put it into standards mode). See: http://css-discuss.incutio.com/?page=BoxModelHack INVALID p.s. The issue with growing boxes when changing style.display appears genuine, if you haven't already done so please file a separate bug about that in the Browser product of bugzilla.mozilla.org (though it could be a duplicate of Bug 234593, I'm not sure).
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.