Properties 411
CSS
Properties
Web Design in a Nutshell, eMatter Edition
Inherited:
No
This property sets the border color for each of the four sides of an element
box. A single value will apply to all four borders of the box. More than one
value will be applied as described for the marginproperty (top, right,
bottom, left).
border-style
Values:
none|dotted|dashed|solid|double|groove|ridge|inset|outset
Example:
P.example{ border-style: solid dashed }
Applies to:
All elements
Inherited:
Yes
This property sets the style of border for an element box. The different styles
are illustrated in Figure 23-3. A single value will result in a box with the same
style border on all four sides. More than one value will be interpreted as
described for themarginproperty (top, right, bottom, left). The following
example would create a box with a solid line on the top and bottom and with
dashed rules on the left and right sides.
border-top, border-right, border-bottom, border-left
Values:
border-top-width|border-style|border-color
Example:
H1: { border-left: .5em solidblue }
Applies to:
All elements
Figure 23-3: Potential border styles
double
solid ridge
dotted inset
dashed outset
groove