From Htmlpedia
Jump to: navigation, search

CSS 1 property: border-width

This article is a stub for the property border-width. Related articles include border-top-width, border-bottom-widthborder-left-width and border-right-width. The border-width property is a shorthand for these four values, and is written in the format of Top Right bottom left when four values are included.

Property Values

This property accepts the following value types:

  • 0
  • thin
  • medium
  • thick
  • Any integer number directly followed by
    • em
    • ex
    • px
    • pt
    • mm
    • cm


<style type="text/css">
     element { border-width: value; }
     element { border-width: TopValue RightValue BottomValue LeftValue; }
     element { border-width: TopBottomValues RightLeftValues; }
<element attribute="foo">Contents</element>

Browser Support

This property is fully supported by all modern visual browsers. The only quirk is that IE6 and IE7 get the box model wrong, and don't add the width or height of the border to the width or height of the element. The default value is 'medium', but different browsers give different length values for the key terms of thin, medium and thick.