CSS Border
Description
The border command defines the width, color and style of the border of an element.
The border style is a shorthand so you can set many of the border options in one go. Note if you do not provide a value for all the options the default will automatically be applied.
border:
border-width
border-style
border-color;
The default for border-style is none. So if border-style is not specified the border will not appear.
Examples for Border
test text test text test text test text
<style>
#test { border:5px solid red; }
</style>
<div id="test">test text test text test text test text</div>
test text test text test text test text
<style>
#test2 { border:10px inset red; }
</style>
<div id="test2">test text test text test text test text</div>
Values for Border
| border-width |
px e.g. 5px |
Set the width of the border in pixels or inches. |
| border-style |
none dotted dashed solid double groove ridge inset outset |
Specifies the style of the border |
| border-color |
red
#ff0000
rgb(100%,0%,0%) |
Specifies the color of the border |