- From: John A. Lewis <lewi0371@mrs.umn.edu>
- Date: Tue, 17 Apr 2001 18:05:38 -0500
- To: www-style@w3.org
Tuesday, April 17, 2001, 4:54:30 PM, Philip wrote: PH> I have been wondering about the following related matters: PH> CSS level1 says of Horizontal formatting: PH> The horizontal position and size of a non-floating, block-level element PH> is determined by seven properties: 'margin-left', 'border-left', PH> 'padding-left', 'width', 'padding-right', 'border-right' and PH> 'margin-right'. The sum of these seven is always equal to the 'width' of PH> the parent element PH> Does this mean that it is proper for a block element to always scroll or PH> crop an amount equal to the padding inside the width of the parent PH> element? This seems improper to me. I don't understand your question. However, it's not *always* appropriate to scroll or crop an "amount equal to the padding inside the 'width' of the parent element" (what exactly you mean by this, I'm not sure). For example, a block element with 'width: auto' and 'padding-left: 50%' doesn't *always* need to "scroll or crop." (Hell, even IE5.5 gets this one right.) PH> I suppose as well that if the padding on the body tag is zero then a PH> block element of width 100% should _not_ scoll regardless of margin or PH> border size. Since Netscape 6 and Mozilla both scroll the distance of PH> the combined border and margin of a div of width 100% this must be a PH> formatting bug. NS6 & Mozilla interpret the CSS box model correctly, as far as I can tell. See section 4 of CSS1: The size of the box is the sum of the element width (i.e. formatted text or image) and the padding, the border and the margin areas. http://www.w3.org/TR/REC-CSS1#formatting-model Before IE6, IE did NOT get the CSS box model right. IE will instead subtract (?) borders and padding from the specified 'width'.
Received on Tuesday, 17 April 2001 19:04:00 UTC