Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What does > mean?

0 views
Skip to first unread message

Bob Phillips

unread,
Nov 13, 2002, 1:27:10 PM11/13/02
to
Hi all,

I recently saw a stylesheet with the following in
#content >p { (or maybe it was p> - sorry, I don't have it to hand)

Can someone tell me what that does?

TIA

--
Bob Phillips
... looking out across Poole Harbour to the Purbecks


Paul A. Scott

unread,
Nov 13, 2002, 5:33:20 PM11/13/02
to Bob Phillips

> I recently saw a stylesheet with the following in
> #content >p { (or maybe it was p> - sorry, I don't have it to hand)
>
> Can someone tell me what that does?

The explanation is in the CSS2 specification document (available at
www.w3.org) on page 54. It is not available in CSS1.

The format is this:

E > F { }

which matches if F is a direct child of E, whereas,

E F { }

matches if F is any descendant of E, and,

E, F { }

matches any F or E.

Paul

0 new messages