Re: Netscape

Andrew N. Marshall wrote:
>Maybe for simple details such as text, color, and margins, but if you
get
>into it heavily, such as absolute positioning or overlapping margins,
>Netscapes cracks real quick. As an example, here is a test site I
created
>months ago.  IE4 views this as if it were a framed document.
>
>http://media-electronica.com/~amarshal/Tests/divframes.html
>
>Not that IE is perfect, but it seems to do a fine job with it display
>oriented attributes.


I believe this works only because IE treats BODY as having a position
property value other than normal.

From the CSS2 draft: "...the content height of a box is either assigned
explicitly (via the 'height' property) or is the minimal height
necessary to include the vertical content of the element and that of all
its flowed children." Also: "The height of an absolutely positioned box
is specified via the source element's 'height' property. However,
specifying a percentage value for 'height' when the parent element's
height is set to 'auto' results in undefined behavior."

If BODY is of display-type block, the initial height is auto and is
determined by the height of its content. The percentage heights declared
for absolutely-positioned elements in your example refer to BODY and are
therefore undefined.

What I would like clarified is: What is the containing block for the
topmost element in the document tree? It seems to me it should be the
viewport, so that this simple addition to your CSS declarations:

  BODY {
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      right: 0; }

would define the height of BODY as equal to the height of the viewport,
and would thereby define the percentage values you use for positioning
the pseudo-frames in your example document.

In short, your example shows what should be possible, but it does not
appear to be in strict accordance with the current draft.

David Perrell

Received on Monday, 9 March 1998 13:16:17 UTC