Adds padding when calculating 100% width in DIV

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
RESOLVED INVALID
17 years ago
6 years ago

People

(Reporter: simpson, Assigned: dbaron)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010726
Netscape6/6.1
BuildID:    200101201

Setting the width css attribute for a DIV with padding will add in the value of
the padding causing the DIV to wrap off the page. This may happen with the
height too. I did not test.

Reproducible: Always
Steps to Reproduce:
1.Render code in Additional Comments.
2.Set the padding to 0px and reload page.
3.

<html>
<div style="background-color: #CCCCCC; padding: 10px; width: 100%">
hello!
</div>
</html>
This is the way the CSS box model works.  (It should work this way in IE6 as
well, I think -- they fixed their code.)  See
http://www.w3.org/TR/REC-CSS2/box.html .

Marking invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID
(And what you want is 'width: auto', not 'width: 100%'.)

Updated

6 years ago
Duplicate of this bug: 728870
You need to log in before you can comment on or make changes to this bug.