CSS Border Properties

2008 Oct 19


Property Values Initial Value Applies to Inherited
border [ <border-color> ||
<border-style> ||
<border-width> ] {1,4} | inherit
not defined all elements no
border-bottom
border-left
border-right
border-top
[ <border-color> ||
<border-style> ||
<border-width> ] | inherit
see each
individual property
all elements no
border-color [ <color> | transparent ] {1,4} | inherit not defined all elements no
border-bottom-color
border-left-color
border-right-color
border-top-color
<color> | transparent | inherit transparent all elements no
border-style [ dashed | dotted | double | groove | inset | hidden | none | outset | ridge | solid ] {1,4} | inherit not defined all elements no
border-bottom-style
border-left-style
border-right-style
border-top-style
dashed | dotted | double | groove | inset | hidden | none | outset | ridge | solid | inherit none all elements no
border-width [ medium | thick | thin | <length> ] {1,4} | inherit not defined all elements no
border-bottom-width
border-left-width
border-right-width
border-top-width
medium | thick | thin | <length> | inherit medium all elements no
Support for transparent borders is not in most browsers.

The border-color is the same as the content color by default.


Border style examples:

dashed6
dotted6
double6
groove6
inset6
outset6
solid6
ridge6
mixed6
mix