CSS <p></p> Question

Associate
Joined
3 Oct 2006
Posts
2,304
Location
London
Hi,

If I had a lot of <p></p> tags inside a <td class="test"></td> tag, is there anyway using CSS to define that every <p></p> inside the <td class"test"></td> has certain properties, without having to go through and add the class="" to each of the <p>'s?

Thanks
 
Code:
td p{text-align:center}

That would give all the <p> tags in any <td> tags a text-align:center property.

Code:
.test p{text-align:center}

That would give all the <p> tags in any element with the class as "test" a text-align:center property.
 
Back
Top Bottom