outline

  • Revision slug: CSS/outline
  • Revision title: outline
  • Revision id: 25531
  • Created:
  • Creator: j.j.
  • Is current revision? No
  • Comment no wording changes

Revision Content

{{ CSSRef() }}

Summary

The outline property is a shorthand property for setting the individual outline property values in a single place in the style sheet. outline can be used to set the values for one or more of: {{ Cssxref("outline-width") }}, {{ Cssxref("outline-style") }}, {{ Cssxref("outline-color") }}.

  • {{ Xref_cssinitial() }}: see individual properties for details
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: no
  • Percentages: N/A
  • Media: {{ Xref_cssvisual() }}, {{ Xref_cssinteractive() }}
  • Computed value: see individual properties

In browsers previous to Gecko 1.8 (Firefox 1.5) a similar effect can be achieved using Mozilla CSS Extension {{ Cssxref("-moz-outline") }}.

Syntax

outline: [outline-width || outline-style || outline-color | inherit] ;

Values

border-width
See {{ Cssxref("outline-width") }}.
border-style 
See {{ Cssxref("outline-style") }}.
border-color 
See {{ Cssxref("outline-color") }}.

Examples

{{ CSSRefExampleLink("outline") }} {{ Fixeg() }}

element { 
  outline: 1px solid #000;
}

Notes

While the {

Specifications

Browser compatibility

Browser Lowest Version
Internet Explorer (8.0 expected)
Firefox 1.5
Opera 7.0
Safari 1.2

See also

{{ CSS_Reference:Outline() }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>The <code>outline</code> property is a shorthand property for setting the individual outline property values in a single place in the style sheet. <code>outline</code> can be used to set the values for one or more of: {{ Cssxref("outline-width") }}, {{ Cssxref("outline-style") }}, {{ Cssxref("outline-color") }}.</p>
<ul> <li>{{ Xref_cssinitial() }}: see individual properties for details</li> <li>Applies to: all elements</li> <li>{{ Xref_cssinherited() }}: no</li> <li>Percentages: N/A</li> <li>Media: {{ Xref_cssvisual() }}, {{ Xref_cssinteractive() }}</li> <li>Computed value: see individual properties</li>
</ul>
<p>In browsers previous to <a href="/en/Gecko" title="en/Gecko">Gecko</a> 1.8 (<a href="/en/Firefox_1.5_for_developers" title="en/Firefox_1.5_for_developers">Firefox 1.5</a>) a similar effect can be achieved using <a href="/en/CSS_Reference/Mozilla_Extensions" title="en/CSS_Reference/Mozilla_Extensions">Mozilla CSS Extension</a> {{ Cssxref("-moz-outline") }}.</p>
<h3 name="Syntax">Syntax</h3>
<pre class="eval">outline: [<em>outline-width</em> || <em>outline-style</em> || <em>outline-color</em> | <em>inherit</em>] ;
</pre>
<h3 name="Values">Values</h3>
<dl><dt> border-width</dt><dd> See {{ Cssxref("outline-width") }}. </dd><dt> border-style </dt><dd> See {{ Cssxref("outline-style") }}. </dd><dt> border-color </dt><dd> See {{ Cssxref("outline-color") }}. </dd></dl>
<h3 name="Examples">Examples</h3>
<p>{{ CSSRefExampleLink("outline") }} {{ Fixeg() }}</p>
<pre class="eval">element { 
  outline: 1px solid #000;
}
</pre>
<h3 name="Notes">Notes</h3>
<p>While the {</p>
<h3 name="Specifications">Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/CSS21/ui.html#dynamic-outlines" title="http://www.w3.org/TR/CSS21/ui.html#dynamic-outlines">CSS 2.1</a> </li> <li><a class="external" href="http://www.w3.org/TR/css3-ui/#outline1" title="http://www.w3.org/TR/css3-ui/#outline1">CSS3 Basic User Inteface Module #outline</a> </li>
</ul>
<h3 name="Browser_compatibility">Browser compatibility</h3>
<table class="standard-table"> <tbody> <tr> <th>Browser</th> <th>Lowest Version</th> </tr> <tr> <td>Internet Explorer</td> <td>(8.0 expected)</td> </tr> <tr> <td>Firefox</td> <td>1.5</td> </tr> <tr> <td>Opera</td> <td>7.0</td> </tr> <tr> <td>Safari</td> <td>1.2</td> </tr> </tbody>
</table>
<h3 name="See_also">See also</h3>
<p>{{ CSS_Reference:Outline() }}</p>
Revert to this revision