Re: How is it possible to devise such a feeble system?

> If that was the case, then if I was to apply a style to the body
> element, and give it a background color, then I would only see the
> background color on some of the page (for small documents), correct?

For XML (assuming you have a non-XHTML flavor of XML that has a <body>
tag, yes.  For HTML as special case is made at
http://www.w3.org/TR/REC-CSS2/colors.html#q2:

  For HTML documents, however, we recommend that authors specify the
  background for the BODY element rather than the HTML element. User
  agents should observe the following precedence rules to fill in the
  background: if the value of the 'background' property for the HTML
  element is different from 'transparent' then use it, else use the value
  of the 'background' property for the BODY element. If the resulting
  value is 'transparent', the rendering is undefined.

This is basically an ugly hack to handle the fact that in HTML
background always got set on <body> and that people expect the behavior
you describe....


> The body takes up the entire viewport (by default).

Try applying a border to <body> to see that this is not always the case.

Boris
-----------------
617-864-9910
-----------------
Computer, n: 
   A device to speed up and automate errors

Received on Wednesday, 24 October 2001 14:22:44 UTC