mozilla

Revision 40992 of :last-child

  • Revision slug: CSS/:last-child
  • Revision title: :last-child
  • Revision id: 40992
  • Created:
  • Creator: Jethro
  • Is current revision? No
  • Comment Created page

Revision Content

Selects the last element of a selected group.

Ex:
ul li:last-child{color: green}

<ul>
<li>one</li>
<li>two</li>
</ul>

Revision Source

<p>Selects the last element of a selected group. 
</p><p>Ex:<br>
ul li:last-child{color: green}
</p><p>&lt;ul&gt;<br>
&lt;li&gt;one&lt;/li&gt;<br>
&lt;li&gt;<span style="color: green">two</span>&lt;/li&gt;<br>
&lt;/ul&gt;
</p>
Revert to this revision