You are here: Reference > CSS > properties > border-top-width

border-top-width property

Browser support:
Specifies the width of the element's top border.
JavaScript page for this property: borderTopWidth. You can find other example(s) there.

Possible values:

 One of the following values: 
border width in non-negative length
The width of the border in length units. For the supported length units, see the length page.
inherit
Takes the value of this property from the computed style of the parent element.
medium
Default.
thick
Greater than the medium width.
thin
Less than the medium width.
Default: medium.

Example HTML code 1:

This example illustrates the use of the border-top-width property:
<head>
    <style>
        .example {
            border-top-color: blue;
            border-top-width: 5px;
            border-top-style: solid;
        }
    </style>
</head>
<body>
    <div class="example">Border-top-width: 5px</div>
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content