Home > DeveloperSection > Forums > Descendant Selectors in CSS
Dag Hammarskjold
Dag Hammarskjold

Total Post:24

Points:168
Posted on    June-14-2013 8:54 AM

 CSS-CSS3 CSS-CSS3 
Ratings:


 1 Reply(s)
 780  View(s)
Rate this:
Hi Expert,

Can any one tell me what is descendant selectors in css and how to use this? 

Please provide any use full example.

Any help on above is really appreciated.


Dev Patel

Total Post:26

Points:182
Posted on    June-17-2013 4:26 AM

Hi,

Descendant selectors apply style based on whether one element is a descendant of another. In CSS, descendant means an element that is a child, grandchild, great grandchild, and so on, of another element. This type of relationship is referred to as an ancestral relationship. 

e.g. 

div#body span.inline-code {
font-family:monospace; 
}

Don't want to miss updates? Please click the below button!

Follow MindStick