[thelist] 1px table borders in netscape (and a vi question)

Jeff jeff at c4webdesign.com
Tue Aug 22 21:29:07 CDT 2000


erik,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Erik M. Sabowski <sabowski at wam.umd.edu>
:
: I am trying to make tables with a 1px black border
: using the following attributes in my table tag:
:
: border="0" cellspacing="1" bgcolor="#000000"
:
: but this doesn't work in netscape, i assume this is
: because netscape doesn't support the bgcolor attribute,
: since it isn't defined in the HTML 4.0 specification. so in
: netscape, the borders just end up being the same color
: as the background of the page. Is there anyway to get this
: to work in netscape?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

your example doesn't work because netscape only supports the bgcolor
attribute for <tr> & <td> tags.  there's a hack to getting the same effect
in netscape, but it's not always the best way.  it involves nesting the
table you want bordered within a single cell table with the bgcolor of the
single cell set to the color you want the border.  then, give the nested
table a cellspacing of 1 (or however wide you want your borders).

<table cellspacing="0" cellpadding="0" border="0">
<tr>
  <td bgcolor="#000000">
  <table cellpadding="4" cellspacing="1" border="0">
  <tr>
    <td>
       your content that you want bordered
    </td>
  </tr>
  </table>
  </td>
</tr>
</table>

good luck,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org







More information about the thelist mailing list