mozilla

Compare Revisions

:nth-of-type

Change Revisions

Revision 293372:

Revision 293372 by teoli on

Revision 352111:

Revision 352111 by wlach on

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

Revision 293372
Revision 352111
tt25    <h2 name="Alternating_paragraph_justification_example">
26      Alternating paragraph justification example
27    </h2>
28    <h3>
29      HTML Content
30    </h3>
31    <pre class="brush: html">
32&lt;div&gt;
33    &lt;p&gt;First paragraph (left aligned)&lt;/p&gt;
34    &lt;p&gt;Second paragraph (right aligned)&lt;/p&gt;
35    &lt;p&gt;Third paragraph (left aligned)&lt;/p&gt;
36&lt;/div&gt;
37</pre>
38    <h3>
39      CSS Content
40    </h3>
41    <pre class="brush: css">
42p:nth-of-type(2n+1) { text-align: left; }
43p:nth-of-type(2n+1) { text-align: right; }
44</pre>
45    <p>
46      {{ EmbedLiveSample('Alternating_paragraph_justification_exa
 >mple') }}
47    </p>

Back to History