[thelist] [CSS] table border tip

Paul Bennett paul at teltest.com
Thu Aug 7 19:45:07 CDT 2003

<tip type="css table borders">
in the event that you need table borders to display nicely across a 
range of browers and want to avoid the ill-supported table 'bordercolor' 
set the following properies in your table tag:
cellspacing="1" (or the width of the "border" you want the table to have)

then: in your stylesheet set the background-color of your table to the 
color you desire for your css table "border"
    background-color: #404040;

now set the background-color attributes for your td / thead / tbody 
sections to the desired colours of the inside of the table
These must be set otherwise the table background color (which you want 
as your border) will color the entire contents of the table

thead td
    background-color: #eee;
tbody td
    background-color: #fff;

(tested successfully on NS6.2, Mozilla 1.4b, IE 6, Opera 7.11)


	Paul Bennett						
	Internet Developer				
	Teltest Electronic Design		
Email: paul at teltest.com				
Phone: 64 4 237 4557					
Web: http://www.teltest.com		
Wap: http://wap.teltest.com			

More information about the thelist mailing list