954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Gap between div and table

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?

vexhawk
Newbie Poster
24 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

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.

vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42
 

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

Attachments Screen-shot-2011-06-05-at-01.20_.jpg 34.43KB
Quadzilla
Newbie Poster
1 post since Jun 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You