CSS BORDER

Border CSS properties allow you to specify the type, thickness and color of the border of an element.

Border Style

The property border-style specifies the type of border.

The possible values for "border-style" are:
dotted, dashed, solid, double, groove, ridge, inset, outset

You can specify different types for each side edge of the rim.

p { border-top-style: solid; border-right-style: dashed; border-bottom-style: groove; border-left-style: dotted; }

You can also definer together, on the same line (top, right, bottom, left)

p {border-style:solid dashed groove dotted;}

Border Width

The property border-width specifies the border width.

You can specify in pixels.

There are also these predefined values: thin, medium

example:

.p1 { border-style:dotted; border-width:3px;} .p2 { border-style:solid; border-width:thin;}

Border Color

The attribute border-color specifies the border color.

The color can be specified in CSS provided in 3 ways: