Home : Advice : HTML Tutorials : Thin Table Borders


In this tutorial I will show you how to create tables with thin borders. The secret is not to use the border attribute, but instead to use cellspacing to achieve the look of a clean thin border.

Example

   

Now here is the code:

<table width="300" border="0" cellpadding="0" cellspacing="1" bgcolor="#9900CC">
<tr>
<td bgcolor="#9999CC">&nbsp;</td>
<td bgcolor="#9999CC">&nbsp;</td>
</tr>
</table>

I have used the table bgcolor attribute for the border color and the table cell bgcolor attribute for the table inner color. You can use the cellspacing attribute to change the width of the border appearance.


Copyright 2004 - 2005 FREEWEBHOSTINGADVICE.COM Contact | Privacy Policy & Legal