CSS outline-offset property

Description

CSS outline-offset represents space between border and outline. If you want to make sure a focus line outside the element at a distance, you must use outline-offset.

Syntax

outline-offset : length

Property values

lengthDefault

0 is the default value that defines outline width of 0px.

outline-offset: 0;

length

length value represents space between border or element (if there is no border) and outline.

outline-offset: 5px;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 
×

Ctrl+D