mozilla

Compare Revisions

:nth-of-type

Change Revisions

Revision 26886:

Revision 26886 by jswisher on

Revision 293370:

Revision 293370 by teoli on

Title:
:nth-of-type
:nth-of-type
Slug:
CSS/:nth-of-type
CSS/:nth-of-type
Tags:
css, NeedsExample, "CSS Reference", Selectors
css, Selectors, CSS Reference, NeedsExample
Content:

Revision 26886
Revision 293370
n11      The <code>:nth-of-type</code> <a href="/en/CSS/Pseudo-classn11      The <code>:nth-of-type</code> CSS <a href="/en/CSS/Pseudo-c
>es" title="Pseudo-classes">pseudo-class</a> matches an element th>lasses" title="Pseudo-classes">pseudo-class</a> matches an elemen
>at has <code><em>a</em>n+<em>b</em>-1</code> siblings with the sa>t that has <code><em>a</em>n+<em>b</em>-1</code> siblings with th
>me element name before it in the document tree, for a given posit>e same element name before it in the document tree, for a given p
>ive or zero value for <code>n</code>, and has a parent element. S>ositive or zero value for <code>n</code>, and has a parent elemen
>ee {{ Cssxref(":nth-child") }} for a more thorough description of>t. See {{ Cssxref(":nth-child") }} for a more thorough descriptio
> the syntax of its argument. This is a more flexible and useful p>n of the syntax of its argument. This is a more flexible and usef
>seudo selector if you want to ensure you're selecting the same ty>ul pseudo selector if you want to ensure you're selecting the sam
>pe of tag no matter where it is inside the parent element, or wha>e type of tag no matter where it is inside the parent element, or
>t other different tags appear before it.> what other different tags appear before it.
n13    <h3 id="Syntax" name="Syntax">n13    <h2 id="Syntax" name="Syntax">
n15    </h3>n15    </h2>
n19    <h3 id="Examples" name="Examples">n19    <h2 id="Examples" name="Examples">
n21    </h3>n21    </h2>
nn29    <h2 id="Specifications">
30      Specifications
31    </h2>
32    <table class="standard-table">
33      <thead>
34        <tr>
35          <th scope="col">
36            Specification
37          </th>
38          <th scope="col">
39            Status
40          </th>
41          <th scope="col">
42            Comment
43          </th>
44        </tr>
45      </thead>
46      <tbody>
47        <tr>
48          <td>
49            {{ SpecName('CSS4 Selectors', '#nth-of-type-pseudo', 
 >':nth-of-type') }}
50          </td>
51          <td>
52            {{ Spec2('CSS4 Selectors') }}
53          </td>
54          <td>
55            No change.
56          </td>
57        </tr>
58        <tr>
59          <td>
60            {{ SpecName('CSS3 Selectors', '#nth-of-type-pseudo', 
 >':nth-of-type') }}
61          </td>
62          <td>
63            {{ Spec2('CSS3 Selectors') }}
64          </td>
65          <td>
66            Initial definition.
67          </td>
68        </tr>
69      </tbody>
70    </table>
29    <h3 id="Browser_compatibility">71    <h2 id="Browser_compatibility">
n31    </h3>n73    </h2>
n127    <h3 id="See_also" name="See_also">n169    <h2 id="See_also" name="See_also">
n129    </h3>n171    </h2>
t132      </li>t
133      <li>
134        <a class="external" href="http://www.w3.org/TR/css3-selec
>tors/#nth-of-type-pseudo">CSS3 Reference</a> 

Back to History