Closed Bug 215524 Opened 22 years ago Closed 22 years ago

DIV with width 100% renders outside window if padding is added.

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: joakim.schutzer, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; .NET CLR 1.1.4322) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6 If you add padding to a div element which have width=100% it renders outside the window. I expect the padding to be added inside the div and that's also how IE and Opera renders it. Please see attached file for test case. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Attached file Minimal testcase
IE and Opera only do that in "quirks" mode rendering. Per the spec, padding (and margin and border) are 'outside' and added to the width. "The box width is given by the sum of the left and right margins, border, and padding, and the content width. The box height is given by the sum of the top and bottom margins, border, and padding, and the content height." http://www.w3.org/TR/CSS21/box.html#box-dimensions Invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Verified
Status: RESOLVED → VERIFIED
Keywords: testcase
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: