Matthew Ruddy Matthew Ruddy - 1 month ago 14
CSS Question

CSS <td> vertical spacing - can't make it go away

Trying to get rid of the vertical space between the 'td' tags on the following page:

http://framework.matthewruddy.com/2008/09/04/layout-test/3/

How can I make it go away? I cannot figure it out. It isn't happening in IE at all, oddly.

Tried the following CSS, along with a reset CSS.


table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
margin: 0;
padding: 0;
}
table td {
margin: 0;
padding: 0;
}

Answer

Two things here:

In your body tag, you have set the line-height to 24px. You should override this for all table elements, or, in fact, just set it on p tags.

Also you have set the td .post-content .more to have a margin: 15px 0 so that is causing your rows to have an additional 15px top and bottom.

Comments