outline-width

  • Revision slug: CSS/outline-width
  • Revision title: outline-width
  • Revision id: 25669
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment one or more formatting changes

Revision Content

{{ CSSRef() }}

Summary

The outline-width CSS property is used to set the width of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out:

<style type="text/css"></style>
  • {{ Xref_cssinitial() }}: {{ Cssxref("medium") }}
  • Applies to: all elements
  • {{ Xref_cssinherited() }}: no
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}:

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

Syntax

outline-width: thin | medium | thick | {{ Xref_csslength() }} | {{ Cssxref("inherit") }}

Values

thin
Depends on the UA. Typically 1px in desktop browsers like Firefox.
medium
Depends on the UA. Typically 3px in desktop browsers like Firefox.
thick
Depends on the UA. Typically 5px in desktop browsers like Firefox.
<length>
See {{ Xref_csslength() }} values.

Examples

 thin   medium   thick   2px   1ex            5em 

Specifications

  • See {{ Cssxref("outline") }} property

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support  1.0 1.5 (1.8) 8.0 7.0 1.2 (125)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

{{ CSS_Reference:Outline() }}

{{ languages( { "fr": "fr/CSS/outline-width"} ) }}

Revision Source

<p>{{ CSSRef() }}</p>
<h3 id="Summary">Summary</h3>
<p>The<code> outline-width </code>CSS property is used to set the width of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out:</p>
<nobr>
<style type="text/css"><![CDATA[.cssprop {
  display:table;
  padding: 0.4em;
  border-left:0.15em solid;
  background-color:#eeeeff
}
.cssprop li {
 display:table-row;
 padding: 3px;
 margin:0;
}
.cssprop li dfn {
  display:table-cell;
  padding: 0 5px;
  border-bottom: none;
  cursor:inherit;
}

]]></style>
<ul class="cssprop"> <li><dfn>{{ Xref_cssinitial() }}:</dfn> {{ Cssxref("medium") }}</li> <li><dfn>Applies to:</dfn> all elements</li> <li><dfn>{{ Xref_cssinherited() }}:</dfn> no</li> <li><dfn>Media:</dfn> {{ Xref_cssvisual() }}</li> <li><dfn>{{ Xref_csscomputed() }}:</dfn></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>) essentially the same effect can be achieved using <a href="/en/CSS/CSS_Reference/Mozilla_Extensions" title="en/CSS_Reference/Mozilla_Extensions">Mozilla CSS Extension</a> {{ Cssxref("-moz-outline-width") }}.</p></nobr><h3 id="Syntax" name="Syntax">Syntax</h3>
<pre class="eval" style="white-space: normal;">outline-width: thin | medium | thick | {{ Xref_csslength() }} | {{ Cssxref("inherit") }}
</pre>
<h3 id="Values">Values</h3>
<dl> <dt>thin</dt> <dd>Depends on the UA. Typically <strong>1px</strong> in desktop browsers like Firefox.</dd> <dt>medium</dt> <dd>Depends on the UA. Typically <strong>3px</strong> in desktop browsers like Firefox.</dd> <dt>thick</dt> <dd>Depends on the UA. Typically <strong>5px</strong> in desktop browsers like Firefox.</dd> <dt>&lt;length&gt;</dt> <dd>See {{ Xref_csslength() }} values.</dd>
</dl>
<h3 id="Examples">Examples</h3>
<pre> <span style="outline:solid thin">thin</span>   <span style="outline:solid medium">medium</span>   <span style="outline:solid thick">thick</span>   <span style="outline:solid 2px">2px</span>   <span style="outline:solid 1ex">1ex</span>            <span style="outline:solid 5em">5em</span> 
</pre>
<h3 id="Specifications">Specifications</h3>
<ul> <li>See {{ Cssxref("outline") }} property</li>
</ul>
<h3 id="Browser_Compatibility" name="Browser_Compatibility">Browser compatibility</h3>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari (WebKit)</th> </tr> <tr> <td>Basic support</td> <td> 1.0</td> <td>1.5 (1.8)</td> <td>8.0</td> <td>7.0</td> <td>1.2 (125)</td> </tr> </tbody> </table>
</div>
<div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Phone</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<h3 id="See_also" name="See_also">See also</h3>
<p>{{ CSS_Reference:Outline() }}</p>
<p>{{ languages( { "fr": "fr/CSS/outline-width"} ) }}</p>
Revert to this revision