The Sysadmin Notebook  

Sitemap

CSS for Styling Borders

Styling Borders with CSS

Useful for marking out block elements such as tables and lists.

Property Values
border A shorthand property for setting all of the properties for the four borders in one declaration border-width
border-style
border-color
border-bottom A shorthand property for setting all of the properties for the bottom border in one declaration border-bottom-width
border-style
border-color
border-bottom-color Sets the colour of the bottom border color
border-bottom-style Set the style of border used none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset
border-bottom-width Sets the width of the bottom border thin
medium
thick
length
border-color Sets the color of the four borders, can have from one to four colors color
border-left A shorthand property for setting all of the properties for the left border in one declaration border-left-width
border-style
border-color
border-left-color Sets the color of the left border border-color
border-left-style Sets the style of the left border border-style
border-left-width Sets the width of the left border thin
medium
thick
length
border-right A shorthand property for setting all of the properties for the right border in one declaration border-right-width
border-style
border-color
border-right-color Sets the color of the right border border-color
border-right-style Sets the style of the right border border-style
border-right-width Sets the width of the right border thin
medium
thick
length
border-style Sets the style of the four borders, can have from one to four styles none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset
border-top A shorthand property for setting all of the properties for the top border in one declaration border-top-width
border-style
border-color
border-top-color Sets the color of the top border border-color
border-top-style Sets the style of the top border border-style
border-top-width Sets the width of the top border thin
medium
thick
length
border-width A shorthand property for setting the width of the four borders in one declaration, can have from one to four values thin
medium
thick
length