:default

  • Revision slug: CSS/:default
  • Revision title: :default
  • Revision id: 41463
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment [[CSS:default]] moved to [[CSS::default]]: fix name error

Revision Content

{{template.CSSRef()}} {{template.Fx_minversion_header(3)}}

Summary

The :default selector is used to identify a user interface element that is the default among a group of similar elements.

For example, the default button in a set of buttons would have this pseudo-class applied to it.

User interface elements that permit multiple selection may have multiple defaults set in order to initially appear with multiple items selected.

Syntax

span:default { style properties }


Examples

span:default
{
    background-color: lime;
}

...where...

  <span></span>

This example causes the background color to be lime for the default element.

Revision Source

<p> 
{{template.CSSRef()}}
{{template.Fx_minversion_header(3)}}
</p>
<h3 name="Summary"> Summary </h3>
<p>The <code>:default</code> selector is used to identify a user interface element that is the default among a group of similar elements.
</p><p>For example, the default button in a set of buttons would have this pseudo-class applied to it.
</p><p>User interface elements that permit multiple selection may have multiple defaults set in order to initially appear with multiple items selected.
</p>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">span:default { <i>style properties</i> }
</pre>
<p><br>
</p>
<h3 name="Examples"> Examples </h3>
<pre>span:default
{
    background-color: lime;
}
</pre>
<p>...where...
</p>
<pre>  &lt;span&gt;&lt;/span&gt;
</pre>
<p>This example causes the background color to be <code>lime</code> for the default element.
</p>
Revert to this revision