CSS Home

Border Formatting with Cascading Style Sheets

Cascading Style Sheets provide many different options for border formatting. See also Boxes and Margins for related topics

border: This allows one to specify the border around a box in the order width, style, color. For example, border:5px dashed blue; produces a 5-pixel-wide, dashed, blue border around the box. Options for style include dashed, dotted, double, groove, inset, none, outset, ridge and solid.

border-color: This specifies only the color of the border. Colors may be either named or specified as #rgb, which are the red green and blue values in hexadecimal.

border-bottom: This specifies the bottom border only in the order width, style, color.

border-left: This specifies the left border only in the order width, style, color.

border-right: This specifies the right border only in the order width, style, color.

border-top: This specifies the top border only in the order width, style, color.

border-bottom-color: This specifies the color of the bottom border only.

border-left-color: This specifies the color of the left border only.

border-right-color: This specifies the color of the right border only.

border-top-color: This specifies the color of the top border only.

border-style: This specifies the style of the border. Options for style include dashed, dotted, double, groove, inset, none, outset, ridge and solid.

border-width: This specifies the width of the entire border.

border-bottom-width: This specifies the width of the bottom border only.

border-left-width: This specifies the width of the left border only.

border-right-width: This specifies the width of the right border only.

border-top-width: This specifies the width of the top border only.

©2003 All Rights Reserved