border-top-width
Specifies the width of the top border.
Sample Code
div.test { border-top-width: thin;}
div.test1 { border-top-width: medium;}
div.test2 { border-top-width: 10px;}
Available Values
| Value | Description |
|---|---|
| Number | Specifies the border width in units such as 'px'. |
| thin | The keyword 'thin'. Typically rendered as 1px, though it may vary slightly by browser. |
| medium | The keyword 'medium'. Typically rendered as 3px, though it may vary slightly by browser. This is the initial value when no 'border-top-width' is specified. |
| thick | The keyword 'thick'. Typically rendered as 5px, though it may vary slightly by browser. |
Browser Preview
※ The samples below have 'border-style' set to 'solid'.
<div style="border-top-width: 10px; border-style: solid; height: 100px; padding: 10px; font-weight: bold;">A div element with height 100px and padding 10px.</div>
Browser Support
Desktop
Supported in all versions
8 ○
7 ○
6 ○
2 and earlier ×Mobile
Android Browser
2.2+ ○
1 and earlier ×Same support as desktop
Same support as desktop
※ Version data based on MDN.
If you find any errors or copyright issues, please contact us.