Topics:
» ASP
» HTML
» Stylesheets
» JavaScript
» PHP
» Flash
» More...

Site:
» Forum
» About

CSS Tables

CSS can be used to define tables. As CSS lets you list properties to be including in any tag, you can easily add borders and backgrounds to tables. Take a look at this table:

 

Now heres the code:

<table width="200" border="0" align="center" cellpadding="0" cellspacing="0" style='BORDER-TOP: #84B953 2px solid; BORDER-RIGHT: #84B953 2px solid; BORDER-LEFT: #84B953 2px solid; background: #C8E3AC'>
<tr>
<td>&nbsp;</td>
</tr>
</table>

The style tags defines each of the borders so you can change, remove or add borders as you wish. It also defines the background of the table. If you included this in a style sheet it would change all the tables to how you wanted them.