Outline Properties





PropertyDescriptionPossible ValuesExamples
outline-colorDeclares the outline color.Valid color names, RGB values, hexidecimal notation.
div { outline-color:green; }

div { outline-color:#00FF00; }

outline-styleDeclares the style of the outline.
none
dotted
dashed
solid
double
groove
ridge
inset
outset
div { outline-style:solid; }

div { outline-style:inset; }

outline-widthDeclares the width of the outline.Lengths or the following predefined values:

thin
medium
thick

div { outline-width:2px; }

div { outline-width:thin; }

outlineUsed as a shorthand property to set all the background properties at once.Separate values by a space in the following order (those that are not defined will use inherited or default initial values):

outline-color
outline-style
outline-width

div { outline:green solid 2px; }

div { outline:#00FF00 double thick; }




Back to Learn More About CSS