1. Home
  2. Computing & Technology
  3. Web Design / HTML

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:

Return to the Style Library

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: border-width>

©2009 About.com, a part of The New York Times Company.

All rights reserved.