Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stubborn table borders 2

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
Why does the following code result in borders between the cells?
<HTML>
<BODY>
<table width=&quot;100%&quot; border=0>
<tr>
<td colspan=3 height=45 bgColor=silver></td>
</tr>
<tr>
<td height=500 width=&quot;15%&quot; bgColor=gray></td>
<td height=500 width=&quot;70%&quot; bgColor=silver></td>
<td height=500 width=&quot;15%&quot; bgColor=gray></td>
</tr>
</table>
</BODY>
</HTML>

I'd prefer no borders at all, but if they have to be there, can I make them black?

Thanks!
 
What browser are you using? I am using IE 5.5 and I don't get borders, I just get spaces. If you want to get rid of the spaces, set use this:

<table width=&quot;100%&quot; border=0 cellspacing=0 cellpadding=0>

This will smash the table rows and cells together. Thanks
John

johnmc@mvmills.com
 
i think what you're seeing is not borders but padding and/or cellspacing between the cells
fix1 : <table width=&quot;100%&quot; border=0 cellspacing=0 cellpadding=0>

now if it's still not working :
fix2 : <table width=&quot;100%&quot; border=1 cellspacing=0 cellpadding=0> should display black borders

and if it's still not working (!!!!) then put your table inside another table with only one row one cell and black background


------
please review FAQ183-874 - this will help you to get the best out of tt
[ &quot;you&quot; is not someone in particular - don't take it too personnal ]
 
Here's *exactly* what I wanted-
<HTML>
<BODY>
<table bgcolor=black width=100% border=0 cellspacing=0 cellpadding=0>
<tr><td>
<table width=&quot;100%&quot; border=0 cellspacing=1>
<tr>
<td colspan=3 height=45 bgColor=silver></td>
</tr>
<tr>
<td height=500 width=&quot;15%&quot; bgColor=gray td>
<td height=500 width=&quot;70%&quot; bgColor=silver></td>
<td height=500 width=&quot;15%&quot; bgColor=gray></td>
</tr>
</table>
</td></tr></table>
</BODY>
</HTML>

I can't believe I forgot about the padding/spacing, and the additional table was a great idea. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top