:only-of-type

  • Revision slug: CSS/:only-of-type
  • Revision title: :only-of-type
  • Revision id: 47164
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 4 words added, 4 words removed

Revision Content

{{ CSSRef() }} {{ gecko_minversion_header("1.9.1") }}

Summary

The :only-of-type pseudo-class matches elements that have no siblings with the same element name.

Syntax

element:only-of-type { style properties }

See also

  • {{ Cssxref(":nth-of-type") }}
  • {{ Cssxref(":first-of-type") }}
  • {{ Cssxref(":last-of-type") }}
  • CSS3 Reference

Revision Source

<p>{{ CSSRef() }} {{ gecko_minversion_header("1.9.1") }}</p>
<h3 name="Summary">Summary</h3>
<p>The <code>:only-of-type</code> pseudo-class matches elements that have no siblings with the same element name.</p>
<h3 name="Syntax">Syntax</h3>
<pre class="eval">element:only-of-type { <em>style properties</em> }
</pre>
<h3 name="See_also">See also</h3>
<ul> <li>{{ Cssxref(":nth-of-type") }}</li> <li>{{ Cssxref(":first-of-type") }}</li> <li>{{ Cssxref(":last-of-type") }}</li> <li><a class="external" href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#last-of-type-pseudo">CSS3 Reference</a></li>
</ul>
Revert to this revision