CSS border
All HTML elements have a border, but it is not always visible. In theory you can use invisible borders for positioning elements, but usually they serve to style an element. Borders are an important way to create horizontal rules on a page (as opposed to using the now deprecated <hr> tag for styling). The border property has many values, and like the other box model properties, it too can be written in shorthand. One thing to be aware of when not writing shorthand: border must be written as border-style or the other border properties will not have any effect. Below are the properties and values for border:
border-width
|
border-style: none, dotted, dashed, solid, double, groove, ridge, inset, outset
|
border-color
|
You can also declare your border like this:
border-left:1px solid red; |
Or declare your border like this:
border-left-width:1px; border-left-style:solid; border-left-color:red; |