Question:
How to remove TD border in a table?
C Neg
2007-07-26 00:42:44 UTC
I'm trying to 'completely' disappear the 1-2px border between adjacent cells in a table. no matter what i do, it's still there. it sucks. I was lied to. I thought technology was good and not evil. that's what i get for listening to steve jobs.

I've tried everything. I have used all the border tricks I can think of in CSS...I've even done the cellpadding="0" cellspacing="0" border="0" as attributes trick in the containing table and inner tables...no luck. What's going on?? This is in firefox 2.0.whatever.

Table.container
{
border-collapse: collapse;
border-spacing: 0;
border-width: 0px 0px 0px 0px;
background-color: lightblue;
}

td.pixel:hover
{
font-size: 12px;
background-color: red;
color: red;
border-collapse: collapse;
border-spacing: 0pt 0pt;
border-style: none;
padding: 0px 0px 0px 0px;
width: 12px;
height: 12px;
empty-cells: show;
border-width: 0px 0px 0px 0px;
}

I know border-width is probably actually wrong, but it doesn't work with or without it.
Four answers:
friend
2007-07-26 02:04:58 UTC
What I can understand is you want to have a table (outer) border but want to remove border between adjacent cells.



Set table border="0" or use border-collapse



Then try any one technique



1. use an outer table with border (1 row 1 column) and put inside it your main table (borderless). alternatively, you can use div to create an outer box with border.



2. Or Use inline styles and set left border for all rows in first column (style="border-left:1px solid #00000)

and right border for last column. similary do it for top & bottom.

Use can also define css classes left, right, top, bottom & implement this

--------------------------------------------------------------------------------------

If you want to remove all borders of a table and don't want any border at all, simplest option is by setting border="0" inside

This works fine in firefox. I have tried this many a time.
2016-12-13 15:00:14 UTC
Html Table Outer Border
teef_au
2007-07-26 00:57:06 UTC
ummm in your html try
Then if you want borders in certain cells add them with CSS



Sorry dumb answer I see you already tried that. I am not having that problem with apache webserver and firefox 2.0.0.x



Just remembered - this works for me



.logonbox {

border: 1px;

border-style: solid;

}
Priscilla
2007-07-26 02:13:48 UTC
set the border attribute of table tag to 0


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...