- From: David Perrell <davidp@earthlink.net>
- Date: Sat, 14 Feb 1998 08:47:18 -0800
- To: "'Style Sheet mailing list'" <www-style@w3.org>
Chris Lilley wrote: >A div with width set to 40% will indeed be set relative to the viewport Indeed? Percentage widths are relative to the width of the containing block, which in the case of DIV is not likely to extend the full width of the viewport. If the DIV is a child of BODY and BODY is the root of the document tree, the width of the containing block of the DIV will be equal to the width of the viewport minus any horizontal margins, borders, and padding on BODY. >... So the paragraph will inherit that value and (unless it sets its own >width) will be the same width... Is "inherit" an apt term for describing rules of containment? Width isn't inherited. If the paragraph has margins, borders, or padding, its width will not be the same as the parent DIV. David Perrell
Received on Saturday, 14 February 1998 11:47:48 UTC