View Full Version : Table borders

09-27-2002, 07:16 AM
Can someone please tell me how to get a table border to work in other browsers then IE. I know you can do it in CSS, can someone please tell me how and I what the whole table to have a border (the cells inside), not just the outside.

Regards, Jason

09-27-2002, 11:14 AM
place this into the <table> tag.

border="1" bordercolor="#000000"

09-27-2002, 11:26 AM
This is the CSS way...

<style type="text/css">
.topleft, .topcenter, .topright, .centerleft, .centercenter, .centerright {
border-top:1px solid #000;
.topcenter, .topright, .centercenter, .centerright, .bottomcenter, .bottomright {
border-right:1px solid #000;
.centerleft, .centercenter, .centerright, .bottomleft, .bottomcenter, .bottomright {
border-bottom:1px solid #000;
.topleft, .topcenter, .centerleft, .centercenter, .bottomleft, .bottomcenter {
border-left:1px solid #000;
<table cellspacing="0" cellpadding="0">
<td class="topleft">xxx</td>
<td class="topcenter">xxx</td>
<td class="topright">xxx</td></tr>
<td class="centerleft">xxx</td>
<td class="centercenter">xxx</td>
<td class="centerright">xxx</td></tr>
<td class="bottomleft">xxx</td>
<td class="bottomcenter">xxx</td>
<td class="bottomright">xxx</td></tr>

09-27-2002, 11:32 PM
Originally posted by Mhtml
place this into the <table> tag.

border="1" bordercolor="#000000"

This will only work in IE not Netscape, Opera etc

Thanks anyway

Thanks MCookie that what I needed:)

10-01-2002, 03:08 PM
Try this... using spacing between cells.

<TABLE width=304 cellspacing=0 cellpadding=0 border=0>
<TD valign=top bgcolor="#000000">
<TABLE width=304 cellspacing=1 cellpadding=0 border=0>
<TD width=100 valign=top bgcolor="#FFFFFF" rowspan=2>cell 1</TD>
<TD width=100 valign=top bgcolor="#FFFFFF">cell 2</TD>
<TD width=100 valign=top bgcolor="#FFFFFF">cell 3</TD>
<TD width=100 valign=top bgcolor="#FFFFFF">cell 4</TD>
<TD width=100 valign=top bgcolor="#FFFFFF">cell 5</TD>
<TD width=200 valign=top bgcolor="#FFFFFF" colspan=2>cell 6</TD>
<TD width=100 valign=top bgcolor="#FFFFFF">cell 7</TD>

Also, there are other ways for 1px borders, like building 1px width cells with background color.

Hope this helps.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum