MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 25617 of outline-offset

  • Revision slug: CSS/outline-offset
  • Revision title: outline-offset
  • Revision id: 25617
  • Created:
  • Creator: j.j.
  • Is current revision? No
  • Comment 7 words added, 6 words removed

Revision Content

{{ CSSMozExtensionRef() }}

Summary

outline-offset is used to set space between an outline and the edge or border of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out:

  • Initial value: 0
  • Applies to: all elements
  • Inherited: no

The space will be transparent (the parent will determine the background).

On Mozilla browsers prior to Gecko 1.8 (Firefox 1.5) webdeveloper could archive same effect by using Mozilla CSS Extension {{ Cssxref("-moz-outline-offset") }}.

Syntax

outline-offset: <number> | inherit

Values

<number>
The width of the space.

Examples

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

hbox.example {
  /* Move the outline 2px away from the border */
  outline-offset: 2px;
}

Specifications

Browser compatibility

{{ Fixbrowser() }}

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

See also

{{ CSS_Reference:Outline() }}

Revision Source

<p>{{ CSSMozExtensionRef() }}</p>
<h3 name="Summary">Summary</h3>
<p><code>outline-offset</code> is used to set space between an outline and the edge or border of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out:</p>
<ul> <li>Initial value: 0</li> <li>Applies to: all elements</li> <li>Inherited: no</li>
</ul>
<p>The space will be transparent (the parent will determine the background).</p>
<p>On Mozilla browsers prior 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>) webdeveloper could archive same effect by using <a href="/en/CSS_Reference/Mozilla_Extensions" title="en/CSS_Reference/Mozilla_Extensions">Mozilla CSS Extension</a> {{ Cssxref("-moz-outline-offset") }}.</p>
<h3 name="Syntax">Syntax</h3>
<pre class="eval">outline-offset: &lt;number&gt; | inherit
</pre>
<h3 name="Values">Values</h3>
<dl><dt> &lt;number&gt;</dt><dd> The width of the space. </dd></dl>
<h3 name="Examples">Examples</h3>
<p>{{ CSSRefExampleLink("outline-offset") }} {{ Fixeg() }}</p>
<pre class="eval">hbox.example {
  /* Move the outline 2px away from the border */
  outline-offset: 2px;
}
</pre>
<h3 name="Specifications">Specifications</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/css3-ui/#outline-offset" title="http://www.w3.org/TR/css3-ui/#outline-offset">CSS 3 Basic User Interface</a></li>
</ul>
<h3 name="Browser_compatibility">Browser compatibility</h3>
<p>{{ Fixbrowser() }}</p>
<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>9.5</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