We help IT Professionals succeed at work.

HTML/CSS hide border between cells?

dgmoore1
dgmoore1 asked
on
Medium Priority
465 Views
Last Modified: 2012-05-12
I have a table with one row and 3 columns. I am trying to hide the borders between the cells with no luck. When I use

TABLE.noborder {border:1px solid black;}
TR.noborder {border:0px;}
TD.noborder {border:0px;}

I still get a 1px white border between the cells. I'm trying to visually merge the cells so they appear to have no border between them. Even when I set TD border-color to match the cell fill color I still get the 1 px white border. Any hints?
Comment
Watch Question

Top Expert 2013

Commented:
table
{
border-collapse:collapse;
}

should do it.
CERTIFIED EXPERT

Commented:
border-style:none;
HainKurtSr. System Analyst
CERTIFIED EXPERT

Commented:
this works fine for me...
<style>
TABLE.noborder {border:1px solid black;}
</style>

<table class=noborder>
<tr>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
</table>

Open in new window

HainKurtSr. System Analyst
CERTIFIED EXPERT

Commented:
post html, how do you use these classes in your table that you mentioned
Web Programmer/Technician
Commented:
<table cellpadding="0" cellspacing="0">

Open in new window

Author

Commented:
<center><table class="noborder">
<tr class="noborder">
<td class-"noborder"><a href="target.html">Target</a></td><td class="noborder"><img src="picture.jpg"></td><td class="noborder">Text Line 1<br>Text Line 2</td>
</tr>
</tr>

Author

Commented:
This gets rid of the residual borders between cells.
HainKurtSr. System Analyst
CERTIFIED EXPERT

Commented:
<td class-"noborder">
-->
<td class="noborder">


also no need for td tr



<style>
TABLE.noborder {border:1px solid black;}
</style>

<center>
<table class="noborder">
<tr>
<td><a href="target.html">Target</a></td><td class="noborder"><img src="picture.jpg"></td>
<td>Text Line 1<br>Text Line 2</td>
</tr>
</table>
</center>

Open in new window

Explore More ContentExplore courses, solutions, and other research materials related to this topic.