XML technologies / CSS / Advanced websites with CSS / CSS property reference / border-width

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

The shorthand property border-width describes the border width for each side of an HTML element.

The properties border-bottom-width, border-left-width, border-right-width and border-top-width can also specify border widths separately for each side.

Inherited: no

Values

thin, medium, thick or a CSS measurement

When specifying several values, border-width uses the assignments in the table Values for border-color. Values are separated by spaces.

Default value: medium (0 in Netscape 4)

Compatibility

CSS version: 1

Works in all CSS-capable browsers, including Internet Explorer 4 and Netscape 4.

Note the default value 0 in Netscape 4: to make a border visible at all in this browser, a value must be declared for its width.

Example

The following rule gives blockquote elements thick borders at the top and bottom, and thinner borders at the left and right:

blockquote {
 border-style: solid;
 border-width: thick thin;
}

  

 

 

 

back to top