View Full Version : How can I add padding to every cell in my table?

05-25-2007, 02:42 PM
I'd like every cell in my table to have padding-right but I was wondering if there was a way I can define this in my table element and have it cascade down... (eg. instead of adding a class to every table cell).

Also, is there a list of which elements will cascade (eg. inherit) downward from a table to a table row or table cell?


Mr J
05-25-2007, 02:52 PM
Try this

<style type="text/css">



for a specific table give it an id and use

#mytable td{

where the id is mytable

05-25-2007, 03:07 PM
Woah, I can't believe I didn't think of that...

I know a little CSS but.... well, there is no excuse. Thank God it's friday!

...and thanks for your help!

- John