XML technologies / CSS / Advanced websites with CSS / CSS property reference / border-bottom-width, border-top-width, border-left-width, border-right-width

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

The properties border-bottom-width, border-top-width, border-left-width and border-right-width describe the border width for each side of an HTML element.

Inherited: no

See also: border-width

Values

thin, medium, thick or a CSS measurement.

Default value: medium (0 in Netscape 4)

Compatibility

CSS version: 1

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

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 two-pixel-wide borders on the right and left, and one-pixel-wide borders at the top and bottom:

blockquote {
 border-top-width: 1px;
 border-bottom-width: 1px;
 border-left-width: 2px;
 border-right-width: 2px;
}

  

 

 

 

back to top