HTML and CSS Reference
In-Depth Information
■
dashed
: A series of dashes
■
solid
: A solid line
■
double
: Two solid lines separated by a space
■
groove
: Looks like a groove has been carved by the border
■
ridge
: Gives the look of a ridge coming out of the canvas
■
inset
: Gives the appearance that the content was inset into the page
■
outset
: Gives the appearance that the content was raised from
the page
For
dotted
,
double
,
groove
,
ridge
,
inset
, and
outset
, a small
border-width
value may alter the desired appearance—you cannot
round a single pixel dot or find the room within two pixels to draw
the two lines and a gap of a double border.
Like
border-color
,
border-style
can be expanded into four
border-*-style
properties.
border-width
The size of the border for each side. See Chapter 5.
border
(Shorthand)
The
border
shorthand property accepts up to three values representing
border-width
,
border-style
, and
border-color
.
Additional shorthand properties are available for the individual sides of a
block as
border-top
,
border-right
,
border-bottom
, and
border-left
.
fieldset {
border: 1px solid rgb(100,100,200); /* set all 4 borders */