1

I have a table with the class "forum". I would like all p and a tags within the table to have a margin as follows:

.forum p,a { margin:2px; }

The above code however seems to be targetting ancor tags elsewhere on the page aswell.. I cant see where i am going wrong..

Thanks in advance..

1 Answer 1

4

Try:

.forum p, .forum a { margin:2px; }

You need to specify .forum on both, otherwise it thinks you want to apply the style on ALL a tags.

2
  • 1
    That worked fine.. I cant belive i didnt think of that.. Thanks again.
    – Lee
    Commented Jun 5, 2011 at 15:14
  • @Lee, no problem, it's an easy mistake to make :)
    – Jits
    Commented Jun 5, 2011 at 15:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.