Easy Tutorial
❮ Sel Attr Begin Css3 Pr Overflow X ❯

CSS border-width Property

Example

Set the width of the four borders:

p {
    border-style: solid;
    border-width: 15px;
}

Property Definition and Usage

The border-width property sets the width of an element's four borders. This property can have one to four values.

Examples:

border-width: thin medium thick 10px;

border-width: thin medium thick;

border-width: thin medium;

border-width: thin;

Default value: medium
Inherited: no
Version: CSS1
JavaScript syntax: object.style.borderWidth="thin thick"

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property Chrome IE Firefox Safari Opera
border-width 1.0 4.0 1.0 1.0 3.5

Property Values

Value Description
thin Defines a thin border.
medium Default. Defines a medium border.
thick Defines a thick border.
length Allows you to define the width of the border.
inherit Specifies that the border width should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Border

❮ Sel Attr Begin Css3 Pr Overflow X ❯