- From: Hakon Lie <howcome@w3.org>
- Date: Sun, 15 Feb 1998 18:14:49 -0500 (EST)
- To: "David Perrell" <davidp@earthlink.net>
- Cc: "'Style Sheet mailing list'" <www-style@w3.org>
David Perrell writes: > >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. Correct. > >... 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. Correct. The top-down computation model for box sizes has some similarities with inheritace, but I agree that the term "inherit" should be reserved for properties which inherit. -h&kon H å k o n W i u m L i e howcome@w3.org http://www.w3.org/people/howcome World W i d e Web Consortium
Received on Sunday, 15 February 1998 18:15:10 UTC