O
Oli Filth
I'm in the process of converting a website from HTML 4 (Transitional) to XHTML
Transitional. It all validates fine, but I now have a problem with the CSS
styles thar are being inherited.
Take a look at the sample page at http://olifilth.co.uk/test.htm.
==== BEGIN HTML CODE ====
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Test CSS in XHTML</title>
</head>
<body style="background-color: #666">
<div style="color: #FFF; font-size: 24px">
Some text that is white and 24px (and should be).
<table><tr><td>
Some text that is black and small (should be white and 24px ???).
</td></tr></table>
</div>
</body>
</html>
===== END HTML CODE =====
Both lines of text are within a <div> element with some styles defined; the
second line is nested within a <table><tr><td> element. In Firefox 1.0, both
lines of text take on the styles defined in the <div> tag. However, in IE6, only
the first line takes on the style, the second line reverts to a default format.
Both lines took on the defined style when the document was defined as HTML 4
(Transitional) in IE6. So which browser is showing the XHTML version correctly?
Thanks in advance,
Oli
Transitional. It all validates fine, but I now have a problem with the CSS
styles thar are being inherited.
Take a look at the sample page at http://olifilth.co.uk/test.htm.
==== BEGIN HTML CODE ====
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Test CSS in XHTML</title>
</head>
<body style="background-color: #666">
<div style="color: #FFF; font-size: 24px">
Some text that is white and 24px (and should be).
<table><tr><td>
Some text that is black and small (should be white and 24px ???).
</td></tr></table>
</div>
</body>
</html>
===== END HTML CODE =====
Both lines of text are within a <div> element with some styles defined; the
second line is nested within a <table><tr><td> element. In Firefox 1.0, both
lines of text take on the styles defined in the <div> tag. However, in IE6, only
the first line takes on the style, the second line reverts to a default format.
Both lines took on the defined style when the document was defined as HTML 4
(Transitional) in IE6. So which browser is showing the XHTML version correctly?
Thanks in advance,
Oli