CSS/Properties/border-width

border-width

The border-width property is a shorthand property for setting 'border-top-width', 'border-right-width', 'border-bottom-width', and 'border-left-width' at the same place in the style sheet.

Description

Values <border-width>{1,4} | inherit
Initial value See individual properties
Applies to all elements
Inherited No


Values

  • <border-width>{1,4}


  • inherit
    Takes the same specified value as the property for the element's parent.


And see also individual properties


Example

Example A

[style.css]

 h1 {
   border-width: 1px 0px;
   border-style: solid;
 }

[index.html]

  <body>
    <h1>CSS border property example</h1>
  </body>

Csslist2 border-width.png

CSS Reference

The CSS specification defines the border-width property in 8.5.1 Border width.

See also

Last modified on 19 July 2011, at 17:58