W3C home > Mailing lists > Public > www-style@w3.org > February 1998

Re: text:align:justify

From: David Perrell <davidp@earthlink.net>
Date: Sat, 14 Feb 1998 08:47:18 -0800
Message-ID: <002e01bd3968$3749b000$ea05b3d1@davidp>
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


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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:46 UTC