[thelist] CSS Question - Simple
Scott Schrantz
scotts at rci-nv.com
Mon Sep 15 14:05:04 CDT 2003
> -----Original Message-----
> From: Rob Smith [mailto:rob.smith at THERMON.com]
>
> Is saying:
>
> body {
> font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
> font-size: 12px;
> }
> td {
> font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
> font-size: 12px;
> }
> th {
> font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
> font-size: 12px;
> }
> the same as...
> body th td {
> font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
> font-size: 12px;
> }
No. To make it the same, you have to use commas.
body, th, td {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
}
Using only spaces in a declaration, like you did, is used to indicate nesting.
Your declaration, "body th td {}" would read "Apply this to a <td> contained in a <th> contained in <body>". The <body> and <th> would not get the style. Only the <td> would, and only if it was nested in exactly that way.
--
Scott Schrantz
work: www.rci-nv.com
play: www.computer-vet.com/weblog/
More information about the thelist
mailing list