Log in

View Full Version : Controlling table spacing/padding in rows and columns



Bio
08-16-2010, 09:36 PM
So I have a really, really annoying issue. When my table loads on my webpage, the table looks the way I want it to with consistent padding throughout. I used the cellpadding and cellspacing as well to make sure the table behaves as I want it to.

However, when I load it on Firefox, the spacing between rows is larger. It doesn't do this for any other browser except firefox. Each cell has just a single image in them, but I noticed that when I assign a link to the image, the spacing under that cell increases.

It seems like I have to override something the browser is doing, but I tried to use cellpadding and cellspacing and it isn't working. What should I do?

Beverleyh
08-17-2010, 07:52 AM
You could try zeroing the padding and margin on the images and anchor tags in your table.

Something like this in your CSS/stylesheet.


<style type="text/css">
td img, td a { margin:0; padding:0 }
</style>

Check your other CSS too - there may be something else that's adding margins/padding that you've not accounted for.