FW: Block-level formatting and width in Netscape 6

CSS Level 2 seems to be a bit more specific about this. I wonder if a
more careful reading of this:

"The box width is given by the sum of the left and right margins,
border, and padding, and the content width"
http://www.w3.org/TR/REC-CSS2/box.html#mpb-examples

would make a bug out of the Mozilla scrollbar problem. 

position: absolute; left: 100% also behaves differently from how I would
expect. Compare this to the behaviour of left: 100% in background images
where the 100% is measured from the right edge while with boxes it is
measured from the left edge. 

Both of these peculiarities of percent-widths seem to me to be
shortcomings of css. Similar techniques behave in a much more useful
manner in css-free html (<table width="100%"> for example).

-----Original Message-----
From: Clover Andrew [mailto:aclover@1value.com]
Sent: Wednesday, April 18, 2001 10:20 AM
To: www-style@w3.org
Subject: Re: Block-level formatting and width in Netscape 6


Philip Hoyt <phoyt@mspect.com> wrote:

>> The sum of these seven is always equal to the 'width' of the parent
>> element.

> Does this mean that it is proper for a block element to always scroll
> or crop an amount equal to the padding inside the width of the parent
> element?

No, because the 'width' of the parent *is* the same as the width
available to its child element. The parent's padding is *not* included
in the parent's width.

(Except in IE/Win, but that's a bug, and it's fixed in the latest IE6
build. This issue has been discussed a lot recently, see for example
http://www.alistapart.com/stories/journey/4.html .)

> Since Netscape 6 and Mozilla both scroll the distance of the combined
> border and margin(*) of a div of width 100% this must be a formatting
> bug.

(* and padding)

This behaviour is correct, although admittedly often somewhat
inconvenient.

-- 
Andrew Clover
Technical Consultant
1VALUE.com AG

Received on Wednesday, 18 April 2001 12:14:39 UTC