Posted by Jonathan N. Little on 03/11/06 20:10
Manfred Ullrich wrote:
> "Greg N." <yodel_dodel@yahoo.com> schrieb im Newsbeitrag news:duufpt$eim$2@online.de...
>
>>Greg N. wrote:
>>
>>
>>><table style="font-family: sans-serif; font-size:100%;}">
>>
>>Oops, sorry. Make that
>><table style="font-family: sans-serif; font-size:100%;">
>>
> Thank you,
> I think when more than one table is on a page than this is the only way to treat the tables differently.
> Isn't it?
No, if you have more than one table that your wish to style differently
they you can style by 'id' or 'class'.
CSS:
..naked {
border: 0;
border-collapse: collapse;
}
..naked TD { padding .5em; }
..funky {
border: 5px dotted red;
border-collapse: separate;
border-spacing: 1em;
}
..funky TD {
color: lime;
background-color: black;
border: 10px solid yellow;
}
HTML:
<table class="naked">
<tr><td>Table</td><td>Has</td></tr>
<tr><td>No</td><td>borders</td></tr>
</table>
<table class="funky">
<tr><td>Table</td><td>Has</td></tr>
<tr><td>borders</td><td>but</td></tr>
<tr><td>is</td><td>UGLY</td></tr>
</table>
By having the CSS in a separate file you can change the look of your
site by only having to change ONE file.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
[Back to original message]
|