Op 6 Jul 2005 00:16:40 -0700 schreef
michael_quinlivan@hotmail.com:
[color=blue]
>Hi all,
>
>I have noticed that the background color of an XML document cannot be
>set properly using CSS (that is, you cannot define styles for the BODY
>element of an XHTML document).
>
>I have an example of this:
>
www.houseofnerds.com/mathml_test.xml
>
>Because I am trying to display MathML embedded in the page, I need to
>use XML, so I cannot convert this to HTML via XSLT.
>
>The above page renders fine in IE (ignore the giberrish that appears if
>you do not have a MathML display plug-in. The important thing is that
>it displays the background color as green) However, in Firefox (and I
>assume Mozilla and Netscape), the background color is ignored, and it
>is white??
>
>Is there any way to acheive a different background color in both
>browsers using XML + CSS?? Any other suggestions??[/color]
I've no experience in xml/xhtml/xls but:
First of all, your page throws multiple errors when validating
(
http://validator.w3.org/check?uri=ht...thml_test.xml),
maybe you should solve these first.
Second: put a border around the body, this will show you that the main
content is outside the body.
If you remove the xml stylesheet (I can't see what it does anyway),
the css takes effect in FF: the line containing "MathML Test Page" has
a green background (this _is_ the body).
You might consider applying a background to html instead:
html{ background-color: #c8ffc8;}
Hope this is of any use to you.
Bart
--
Bart Broersma
broersma.juda_ANTISPAM_@tiscali.nl
(ff _ANTISPAM_ wegpoetsen uit dit adres natuurlijk)