Previous Message
Next Message

Re: [css-d] CSS Browser Sniffer?

Sent by Bob Boyle on 26 January 2002 20:08

on 1/26/02 7:36 PM, Karen J. Bowen at [EMAIL-REMOVED] wrote:

> I've seen such a syntax before (using '>'), but am unclear about what it
> means.  Could someone pls explain further?

It's used for a   child selector    as in
>> td > img {display: block;}

As opposed to a   descendant selector   as in
>> td img {display: block;}

What does it mean for a tag to be a "child"? It means the child tag is
nested immediately within its "parent" tag. So, that td > img would be
applied for something like:

<td><img></td>    or   <td><p></p><img></td>

But not:


since the <img> isn't directly within the <td>. This last example, though,
shows what "descendants" are ... tags nested at whatever level within the
parent tag. The <p> and <img> tags are both descendants of the <td> in this

Previous Message
Next Message

Message thread:

Possibly related: