border
border-bottom
border-bottom-width
border-color
border-left
border-left-width
border-right
border-right-width
border-style
border-top
border-top-width
PROPERTY: border-width
border-width
:
thin
|
medium
|
thick
|
length
Compatibility:
IE4+ N4+
Version:
Level 1
Inherited:
No
The
border-width
property allows you to set the width of all four borders with only one declaration.
You can declare one, two, three or four widths:
If you declare one width, all four borders will be that width.
If you declare two widths, the top and bottom borders will be the first width, the right and left borders will be the second width.
If you declare three widths, the top border will be the first, the right border the second, and the bottom and left borders the third width.
If you declare four widths, the order is top, right, bottom, left.
thin
|
medium
|
thick
The keyword values of
thin, medium
, or
thick
can be used to set the width of the border line. The exact thickness of the border created by using these keyword values will be determined by your computer/browser combination.
length
The
length
value can be in any of the following seven units. Use the abbreviation.
Length
Abbrev.
centimeters
cm
ems
em
inches
in
millimeters
mm
picas
pc
pixels
px
points
pt
Code:
body { border-width: thick; }
body { border-width: 0.25in; }
body { border-width: 5mm; }
or
p.bordr
{
border-color: red red red red;
border-style: solid solid solid solid;
border-width: 30px 30px 30px 30px;
}
...
<p class="bordr">
DevGuru is great!
</p>
Output:
DevGuru is great!
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information