1. Computing

Discuss in my forum

border-width

By , About.com Guide

border-width Description:

The border-width property is a shorthand tag to define all the border widths of an element.

border-width in CSS Versions:

border-width Syntax:

border-width: [ thin | medium | thick | <length> ]{1,4} | inherit
border-width: border-top-width border-right-width border-bottom-width border-left-width

  • thin, medium, or thick
    The length of these keywords is user-agent dependent, but thin <= medium <= thick.
  • length
    A specific length (include unit of measure).
  • inherit
    The element should have the same border-width setting as the parent.

border-width Initial Value:

Not defined for shorthand properties.

border-width Applies To:

All elements.

border-width Inheritance:

This property is not inherited.

border-width Browser Support:

border-width Examples:

standard border-width

<p style="border-width : 2em;">
 This paragraph has a 2 em top border.
 </p>

set top and bottom the same and right and left the same

<p style="border-width : 2em 1em;">
 This paragraph has a 2 em border on the top and bottom and a 1em border on the right and left.
 </p>

border-width Special Notes:

  • Negative values are permitted.
  • If you don't set the border-style, the border will not display.

More border-width Information:

©2013 About.com. All rights reserved.