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?

Member Avatar for GreenDay2001

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.