Closed Bug 195331 Opened 23 years ago Closed 23 years ago

div padding increases object size

Categories

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

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: vriley, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 When adding padding to a layer, Mozilla/Netscape/Opera increases the layer size instead of moving inner content. After decreasing the height and/or width, the layer will look correct; however, this breaks IE, unbelievably Microsoft actually completed this correctly according to W3C.org specs. Reproducible: Always Steps to Reproduce: 1. Create div with set height, width, background-color, add padding. 2. View using IE and Mozilla, look at difference. Actual Results: Mozilla visibly increased the size of the layer. Expected Results: Mozilla should pad the inner content while keeping the size of the layer the same. If the size of the layer should change, I would expect to use the height and width parameters not padding.
Attached file Example of problem
Comment on attachment 115809 [details] Example of problem View using Mozilla and then use IE 6
'width' and 'height' refer to the content-area only; any padding, borders, or margins are added to those numbers. IE/Win in fact got this wrong, and just about every other browser (including IE/Mac) got it right. Mozilla's behavior on your testcase looks to me to be correct, although I admit I didn't count the pixels to see if the red box is 30 pixels taller and wider than the blue ones. IE6/Win gets this right in "standards mode" (try changing the DOCTYPE to HTML 4.01 Strict). Marking INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: