Does anyone know how to get rid of gap (seems to be 1px) between a the border of a table cell and the border of a div?

I just want the border of the table to collapse into the border of the div.

is border-collapse: collapse; the solution?

Recommended Answers

first of all set margin, padding, (cellspacing, cellpadding for tables only) properties of table and div to 0.

border-collapse sets the space between beween the cells. collapse means no space between cells and seperated means space between cells.

Jump to Post

All 2 Replies

Member Avatar

first of all set margin, padding, (cellspacing, cellpadding for tables only) properties of table and div to 0.

border-collapse sets the space between beween the cells. collapse means no space between cells and seperated means space between cells.

H, I'm new to this but I have exactly the same problem. I have a table in a div but there's a gap at the top of about 1px between the table's top edge and the div's top edge. I've zeroed all padding and borders out on divs and tables but to no avail. You can just see the pale blue line where I've coloured the div. Any ideas how to get rid of it, as it's causing all the other graphics to mis-align.

Jack

jsr27174@yahoo.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.