Outline-offset

Offset an outline, and draw it beyond the border edge.

Syntax
      outline-offset: length | inherit ;

length - The distance the outline is outset from the border edge in px, pt or em (default=0).
inherit - Inherit the property from a parent element.

Examples:
h1 { outline-offset: 2px; }
.emw3class { outline-offset: 1em; }

#emw3id { outline-offset: 5pt; }

Try it:

Outlines differ from borders in that they do not take up space, they are drawn above the content and extend out towards the margin.

(CSS 3) Browser Support: All major browsers apart from IE.

“The theoretical broadening which comes from having many humanities subjects on the campus is offset by the general dopiness of the people who study these things...” ~ Richard Feynman

Related:

outline-color - Color of an outline.
outline-style - Style of an outline.
outline-width - Width of an outline.
The CSS Box Model


Copyright © 2013-2022 Emw3.com
Some rights reserved