DESCENDANT SELECTORS IN CSS

Dag Hammarskjold

Total Post:24

Points:168
Posted by  Dag Hammarskjold
 1074  View(s)
Ratings:
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.
  1. Dev Patel

    Post:26

    Points:182
    Re: Descendant Selectors in CSS

    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; 
    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!