CSS Property outline-width








outline-width sets the width for the overall outline of an element.

Summary

ItemValue
Initial value medium
Inherited No.
Version CSS2
JavaScript syntax object.style.outlineWidth="thin"
Applies to All elements.




CSS Syntax

outline-width: length | medium | thick | thin | inherit 

Property Values

The property values are listed in the following table.

Value Description
thin thin outline
mediumdefault value. a medium width outline.
thick a thick outline
length set the thickness of the outline
inherit inherit the width of the outline from the parent element




Browser compatibility

outline-width Yes 8.0 Yes Yes Yes

Example

An example showing how to use outline-width CSS property.

<!DOCTYPE html>
<html>
<head>
<style>
p.one{<!--  w w  w  .  j a  va  2  s. co  m-->
    border:1px solid red;
    outline-style:solid;
    outline-width:thick;
}
</style>
</head>
<body>
   <p class="one">This is some text in a paragraph.</p>

</body>
</html>

Click to view the demo