View Full Version : Id Css?


pcsgirl
07-17-2006, 02:22 PM
I want to know if there is a way to say, 'This table bgcolor=000000, that table bgcolor=ffffff, font color=000000' with CSS. Maybe like saying 'Table id=1, table id=2', but I'm not sure how or if that would work. If there is a way could someone help me?

Chris
07-17-2006, 02:33 PM
Yes, that would word.

ID's are used in CSS when they only appear once. If the table will be appearing more than once, then use a CLASS.

In the CSS, the code for a table with ID="table1" would be:

#table1{
background-color: red;
}

And the HTML for it would be:

<table id="table1">
..
</table>

Hope that helped :D

Thanks,
Chris

pcsgirl
07-17-2006, 03:36 PM
Yes! Thank you! :)

Chris
07-17-2006, 10:56 PM
You're welcome :D