Visit Mozilla.org

CSS:border-width

From MDC

« CSS Reference

[edit] Summary

border-width sets the width of the border of a box.

[edit] Syntax

 border-width: <border-width-value> {1,4} | inherit

[edit] Values

<border-width-value>
thin | medium | thick | <length> | <percentage>
thin
A thin border.
medium
A medium border.
thick
A thick border.
<length>
The border's thickness has an explicit value. Explicit border widths cannot be negative.
<percentage>
The border's thickness has a percentage value, percentages of the containing block's width. Explicit border widths cannot be negative.

Note: An em value is also supported.

[edit] Related properties


[edit] Examples

View Live Examples

element { 
    border-width: thin;
    border-style: solid;
    border-color: #000;
}

[edit] Specifications

[edit] Browser Compatibility

Browser Lowest Version
Internet Explorer
Firefox
Netscape
Opera


[edit] See Also

border, border-style, border-color,