Home Advertise with us Forum Articles Sitemap Contact

CSS Border

The CSS border property is meant to specify & customize the color & style of the borders that appear around the HTML elements. With the help of the border style property you can choose to display your choice of borders.

Border Style Types
There are a number of border style types that you may use for styling the borders.
Border Width - The border width property is used to alter the thickness of the border by using one of these available pre-defined values – thin, thick or medium.

Example: p.one {border-style:groove; border-width:10px;}

Border Color - The color of the border can be set using the border color property. The border color can be defined by using the generic name, RGB or the hexadecimal notations. The color can also be set to transparent.

Example: p.one {border-style:solid; border-color:green;}

Border Individual Sides - CSS allows each side of the border to be treated separately & uniquely from the other three sides. This means that you can apply different styles for each side of the border (right, left, top and bottom)

p { border-top-style:dotted;
border-left-style:solid; }

To make it more convenient, it is possible to define all the border properties within one property.

Example: border:10px solid black;