In Opera the following CSS formatted XML doc:

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<?xml-stylesheet type="text/css" href="#css"?>
<document>
 <style id="css">
  {}
  style {display:none;}
  document {display:block;background-color:#3080af;}
 </style>
 <contents>
 Hello, World!
 </contents>
</document>

displays the proper bluish background color for
the _entire page_ if and ONLY IF the 'document''s
display property for it is set to block.  Otherwise
only the background of the elements within document
is set to the proper color.  For Mozilla this isn't
necessary.  IE 5 is much more strict in its
interpretation of this which you can test out by

    document {display:block;background-color:#3080af;}

with display set to block vs inline.

For IE, you will need to use the style

    * {background-color:#3080af;}

to set the page background.  Ironically, it is lax
here compared to Opera for which you to need to
define display:block for this style to color the
whole background.

The only style that will work unchanged across
all three browsers is

    * {display:block;background-color:#3080af;}

However... it is unacceptable because it has the nasty
side effect of somehow rendering later 'display:inline'
property settings useless (interestingly, this behaviour
is consistent among all three browsers)!!!!
There seems to be no getting around the fact that
you have to use 2 styles to ensure that your page
background is set to a certain color.  One for the *
selector (and without setting the display property to
anything) and one for the root element selector.
Sighh...... the days of kludges will always seem to be
with us... :-(





Reply via email to