Table Tip: Border Control by Thomas Benton
Want a border for your table, but don't want to use the
standard border? Need a table cell outline? Here's how to
do it.
A SINGLE ROW, SINGLE COLUMN TABLE
Insert a table with one row and one column. Make border equal
zero. Set cellspacing to one. Set cellpadding to whatever you
want it to be.
Choose a background color for your table that will be the
border color you want to use. Then make the cell color white
or other color that you want. Here's an example:
<table border="0" cellspacing="1" cellpadding="3" width="600"
bgcolor="#FF0000">
<tr>
<td bgcolor="#FFFFFF">Content goes here...< d>
< r>
< able>
A SINGLE ROW, TWO CELL TABLE WITH BORDERED LEFT CELL
Actually, to get the effect we want, we'll embed a table in
another table.
First, create a 600 pixel table with one row and two columns.
We'll make the left column 140 pixels wide and the right
column 460 pixels. The left column will be used for a
navigation panel.
Set: border = 0, cellspacing = 0, cellpadding = 0, alignment
= center.
Set: left column width = 140, vertical align = top, horizontal
align = center; right column width = 460, vertical align = top,
horizontal align = center.
Now embed a table in the left column that is 140 pixels wide.
Set: border = 0, cellpadding = 3, cellspacing = 1, width =
140. Make the background color whatever color you want as an
outline of the left cell.
Make the cell color white, or another color you want to use,
and set the vertical alignment to top, and horizontal alignment
to center. Here's the table:
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td width="140"><div align="center"><center><table
border="0" cellpadding="3" cellspacing="1" width="140"
bgcolor="#008000">
<tr>
<td width="140" bgcolor="#FFFFFF">Content goes
here...< d>
< r>
< able>
</center>