you are here: Home arrow HTML/CSS arrow Set the background colour of a table cell with CSS
Set the background colour of a table cell with CSS
User Rating: / 3
PoorBest 
Saturday, 10 December 2005

Set the background colour of a table cell with CSS

This tutorial with guide you through how to set the background colour of a table cell using CSS

1.

In your CSS file, type # followed by whatever you want to call the table cell.

eg

#table1back

2.

Now put in a { and type background-color:#000000; but replace 000000 with whichever colour you want to use and close with }

3.

Now we should have:

#table1back {
background-color:#000000;
}
4.

Now for your tables code in the <td> tag add id="tableback1"

5.

Now we have our CSS code and our table set up. This should be your complete code:

Head Section or CSS File:

#table1back {
background-colour:#000000;
}

Table Code:

<table>
<tr>
<td id="table1back">Table Background 1</td>
</tr>
</table>

Example:

Table Background

 





Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!Squidoo!Free social bookmarking plugins and extensions for Joomla! websites!
 
< Prev   Next >
Based on valid XHTML 1.0 and CSS 2.0 code design by:pixelsparadise.com