dropshado.ws

Front-end development minutiæ

by David DeSandro

Archive
RSS feed
Twitter
GitHub Pages mirror

outline and outline-offset

Typically, I’ve only seen outline used for :active styles, i.e. a:active { outline: none; }. Smartypants Piotr Petrus clued me in to using outline for offset borders with outline-offset.

outline fiddle

Note that outline does not inherit border-radius. Firefox does have -moz-outline-radius just for this. No outline-radius in other browsers currently.

3 Jan 2011
  • CSS
  • Piotr Petrus
  • desandro.com
  • @desandro
  • github.com/desandro
  • desandro’s JS Fiddles