CSS tutorial border properties Free Web Design Tutorials
Home   HTML CSS JavaScript PHP MySQL Usability Glossary
CSSBasicsImplementing CSSCSS SyntaxPseudo Classes/ElementsCSS ClassesCSS PropertiesFontColor and BackgroundTextCSS border propertiesBorderMargins and PaddingSize and Position

Home > CSS > Border Propertiesprinter version

CSS Border Properties

CSS border properties apply to the box that surrounds all elements.

Units of Measurement

Units of measurement, when applied to borders, may either be relative or absolute. Absolute units have no real meaning on a computer screen so are not covered here. Relative units include ...

Example of Setting the Border Properties of a Class
.border_class_name {
border-color: #ff0000;
border-width: 2px;
border-style: solid;
}


PropertyDescriptionValues
border−colorSets the color of all four borders.none
color
border−top−colorSets the color of the top border.none
color
border−right−colorSets the color of the right border.none
color
border−bottom−colorSets the color of the bottom border.none
color
border−left−colorSets the color of the left border.none
color
border−styleSets the style of all four borders.none
solid
double
groove
ridge
inset
outset
border−top−styleSets the style of the top border.none
solid
double
groove
ridge
inset
outset
border−right−styleSets the style of the right border.none
solid
double
groove
ridge
inset
outset
border−bottom−styleSets the style of the bottom border.none
solid
double
groove
ridge
inset
outset
border−left−styleSets the style of the left border.none
solid
double
groove
ridge
inset
outset
border−widthSets the width of all four borders. The width may be thin, medium, thick or length set to units of measurement.thin
medium
thick
length
border−top−widthSets the width of the top border. The width may be thin, medium, thick or length set to units of measurement.thin
medium
thick
length
border−right−widthSets the width of the right border. The width may be thin, medium, thick or length set to units of measurement.thin
medium
thick
length
border−bottom−widthSets the width of the bottom border. The width may be thin, medium, thick or length set to units of measurement.thin
medium
thick
length
border−left−widthSets the width of the left border. The width may be thin, medium, thick or length set to units of measurement.thin
medium
thick
length


Previous - Text Properties Previous - Text Properties     Next - Margins and Padding Next - CSS Margins and Padding Properties


Privacy | Terms | Contact | Links | Sitemap | RSS Feeds RSS and JavaScript Feeds
©2009 www.webdesignworkmate.co.uk all rights reserved 
Design and Production by smallbizonline website design © 2000-2009
Valid HTML 4.01! Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0Valid CSS!
Tips and TricksMenu ButtonsSpecial Effects
Recommended Reading
CSS - the missing manual

The CSS anthology

Beginning CSS web development