Why doesn't this CSS style format all the text on the page?
<style type="text/css">
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
color:#000000;
}
</style>
If there is a table inside the body the font-size remains the same even if I change it in the code above to 1000px. The only way to format the text inside the table is to create a CSS code like the one above replace the tag body with the table tag.You must have some other CSS, or perhaps some horrid presentational markup like <font>, overriding it.Tables are cranky things that often refuse to inherit styles. You can use "body, td" as your selector or the ever so much more radical "*".Tables are cranky things that often refuse to inherit styles. You can use "body, td" as your selector or the ever so much more radical "*".
'*' ? You rebel! Actually, I tested it in IE and Firefox and it worked. My guess is that something else is going on.I usually style tables separately anyway so I guess I haven't noticed this recently.You must have some other CSS, or perhaps some horrid presentational markup like <font>, overriding it.
No I don't. It's just like I told you.
Full Code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Teste</title>
<style type="text/css">
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
}
</style>
</head>
<body>
Testing Verdana
<table align="left" border="1">
<tr>
<td>
Testing Verdana
</td>
</tr>
</table>
</body>
</html>
Check the attachment: testing.htm
I tested it both in Firefox 1.0.2 and in IE 6 and the result is the same.Just another reason why you should use a valid DTDSorry Fang but I don't know what "DTD" means.valid Document Type Definitions (<!-- m --><a class="postlink" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">http://www.w3.org/QA/2002/04/valid-dtd-list.html</a><!-- m -->)
The style will work correctly in IE6 but earlier version will still have problems: table inheritance bug (<!-- m --><a class="postlink" href="http://www.quirksmode.org/bugreports/archives/2005/03/Test_table_inheritance_bug.html">http://www.quirksmode.org/bugreports/ar ... e_bug.html</a><!-- m -->)On my IE6 it still does not work.
But thanks for the explanation!!
In deed!<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Teste</title>
<style type="text/css">
body, html {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
}
</style>
</head>
<body>
Testing Verdana
<table align="left" border="1">
<tr>
<td>
Testing Verdana
</td>
</tr>
</table>
</body>
</html>Or
<style type="text/css">
body, table {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
}
</style>
thank you
<style type="text/css">
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
color:#000000;
}
</style>
If there is a table inside the body the font-size remains the same even if I change it in the code above to 1000px. The only way to format the text inside the table is to create a CSS code like the one above replace the tag body with the table tag.You must have some other CSS, or perhaps some horrid presentational markup like <font>, overriding it.Tables are cranky things that often refuse to inherit styles. You can use "body, td" as your selector or the ever so much more radical "*".Tables are cranky things that often refuse to inherit styles. You can use "body, td" as your selector or the ever so much more radical "*".
'*' ? You rebel! Actually, I tested it in IE and Firefox and it worked. My guess is that something else is going on.I usually style tables separately anyway so I guess I haven't noticed this recently.You must have some other CSS, or perhaps some horrid presentational markup like <font>, overriding it.
No I don't. It's just like I told you.
Full Code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Teste</title>
<style type="text/css">
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
}
</style>
</head>
<body>
Testing Verdana
<table align="left" border="1">
<tr>
<td>
Testing Verdana
</td>
</tr>
</table>
</body>
</html>
Check the attachment: testing.htm
I tested it both in Firefox 1.0.2 and in IE 6 and the result is the same.Just another reason why you should use a valid DTDSorry Fang but I don't know what "DTD" means.valid Document Type Definitions (<!-- m --><a class="postlink" href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">http://www.w3.org/QA/2002/04/valid-dtd-list.html</a><!-- m -->)
The style will work correctly in IE6 but earlier version will still have problems: table inheritance bug (<!-- m --><a class="postlink" href="http://www.quirksmode.org/bugreports/archives/2005/03/Test_table_inheritance_bug.html">http://www.quirksmode.org/bugreports/ar ... e_bug.html</a><!-- m -->)On my IE6 it still does not work.
But thanks for the explanation!!
In deed!<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Teste</title>
<style type="text/css">
body, html {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
}
</style>
</head>
<body>
Testing Verdana
<table align="left" border="1">
<tr>
<td>
Testing Verdana
</td>
</tr>
</table>
</body>
</html>Or
<style type="text/css">
body, table {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:10px;
}
</style>
thank you