IT. Expert System.

CSS

Descendant Selector


Description

The descendant selector matches all elements that are descendants of the specified element.

Sibling elements have the same parent.

This selector has the form:

E F {
  properties
}

Examples

This example colors the text red for every list item element that has ul element as their ancestor. Notice that in this example, even the li items that are part of the ol element are red.

ul li {
  color:red;
}

<ul>
<li>Item 1</li>
<li>Item 2
<ul>
<li>Sub-item 2-A</li>
<li>Sub-item 2-B</li>
</ul>
</li>
<li>Item 3
<ol>
<li>Sub-item 3-A</li>
<li>Sub-item 3-B</li>
</ol>
</li>
</ul>

This produces the following output:

  • Item 1
  • Item 2
    • Sub-item 2-A
    • Sub-item 2-B
  • Item 3
    1. Sub-item 3-A
    2. Sub-item 3-B

Browser Support

Chrome Firefox IE Safari Opera

Miscellaneous Information

Defined In: CSS3


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2180 / 248558677. Delta: 0.00593 с