MathML and CSS don't coexist in XHTML document

Previous Topic
 
classic Classic list List threaded Threaded
2 messages Options
iyb
Reply | Threaded
Open this post in threaded view
|

MathML and CSS don't coexist in XHTML document

iyb

Hello,


I've created two files: an XHTML file, test.xhtml, and a CSS1 file, test.css
(see their listings below). The file test.xhtml contains a simple MathML
formula. The XHTML file is meant to be displayed according to the styling
instructions in test.css .

I've tried viewing test.xhtml with the latest releases of FireFox and Netscape.
The math displays correctly, but the stylesheet instructions do not take effect.
When the postfix of the XHTML file is changed to .html, then the stylesheet
instructions take effect, but the formula is not displayed correctly: it is
displayed like the number 12.

What have i done wrong? What i need to do to have my way? Please enclose sample
files.


Thank you :)


=============

test.xhtml:
-----------

<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title> test </title>
      <link rel="stylesheet" type="text/css" href="test.css" />
   </head>

   <body>
      <math xmlns="http://www.w3.org/1998/Math/MathML">
         <mfrac><mn>1</mn><mn>2</mn></mfrac>
      </math>
   </body>
</html>


test.css:
---------

BODY {
   background-color:#9999CC;
   color:white;
   font-family: sans-serif;
}

=============




Reply | Threaded
Open this post in threaded view
|

RE: MathML and CSS don't coexist in XHTML document

Bernhard Keil

XHTML does not define any element named "BODY".
Write "body" in your CSS and you'll see it works.

Bernhard

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: Saturday, October 29, 2005 3:57 PM
To: [hidden email]
Subject: MathML and CSS don't coexist in XHTML document


Hello,


I've created two files: an XHTML file, test.xhtml, and a CSS1 file, test.css
(see their listings below). The file test.xhtml contains a simple MathML
formula. The XHTML file is meant to be displayed according to the styling
instructions in test.css .

I've tried viewing test.xhtml with the latest releases of FireFox and Netscape.
The math displays correctly, but the stylesheet instructions do not take effect.
When the postfix of the XHTML file is changed to .html, then the stylesheet
instructions take effect, but the formula is not displayed correctly: it is
displayed like the number 12.

What have i done wrong? What i need to do to have my way? Please enclose sample
files.


Thank you :)


=============

test.xhtml:
-----------

<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title> test </title>
      <link rel="stylesheet" type="text/css" href="test.css" />
   </head>

   <body>
      <math xmlns="http://www.w3.org/1998/Math/MathML">
         <mfrac><mn>1</mn><mn>2</mn></mfrac>
      </math>
   </body>
</html>


test.css:
---------

BODY {
   background-color:#9999CC;
   color:white;
   font-family: sans-serif;
}

=============