Chris (spaceninja) wrote,

CSS Question

How do I make a style that I can apply to a table that will allow me to add a margin to each TR and TD?

.tablestyle tr td {margin:10px;}

When you list those in a row, does that mean TRs and TDs within the .tablestyle? Is that correct?

I want to apply a style to a particular table on a page, but not all the other tables. Namely, the padding of the table. For some reason, the table attribute cellpadding="10" is being overruled, so I have to use CSS, and I don't want to have to add an in-line style to every TR and TD...

.tablestyle {margin:10px;}
tr.tablestyle {margin:10px;}
td.tablestyle {margin:10px;}

Those don't work either so I need to somehow apply a margin of 10 to every TR and TD...
  • Post a new comment


    default userpic

    Your IP address will be recorded