I’ve tried to simplify the HTML below as much as possible.
Why does the CSS property, color: #01FFDD;, get ignored by all the elements of the nested table? Nested CSS using <div> works in general for me, but not here. Am I doing something wrong?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<style type="text/css" > #features{color: #01FFDD;} </style>
</head>
<body>
<table border="1">
<tr>
<td>
<div id="features">
<h2>FEATURES</h2>
<table border="1">
<tr>
<td>
<h2>HEADING 1</h2>
<p> SOME TEXT</p>
</td>
<td>
<h2> HEADING 2</h2>
<p>SOME TEXT</p>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
This appears to be a quirks-mode type of issue, at least as I reproduced it in Safari 5.1 — depending on the DOCTYPE, the UA stylesheet contains the rule
Note the
colorproperty.To avoid this, change your
<!DOCTYPE>to the official W3C recommendation for HTML 4.01 Transitional: