dropshado.ws

Front-end development minutiæ

by David DeSandro

Archive
RSS feed
Twitter
original Tumblr version

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.

03 Jan 2011
  • CSS,
  • Piotr
  • Petrus
Page of
  • desandro.com
  • @desandro
  • github.com/desandro
  • desandro’s JS Fiddles