Jump to content

difference between a child combinator and a descendant combinator?


michaellunsford

Recommended Posts

the first will style ANY a tag that is a decendant of div.container

 

ie

<div class="container">
<a ....
<div class="subcontainer">
<a ....
</div>
</div>

 

the second should only work on an anchor tag that is a first child of div.container

 

i.e.

<div class="container">
<a ....
</div>

 

But not any anchor that is a child of a child of div.container.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.