Padding Borders and Margin

border-top border-right border-bottom border-left

Each of these properties add a border line only to a single edge of the element. Each value for this property should be separated by a space.

Example

border-top: 1px dashed blue; border-bottom: 1px solid green;

Browser support

IE5.5+, FF1+, SA1.3+, OP9.2+

Values

Color keyword One of the 17 recognized color keywords; aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white and yellow.
dashed Dashed border line.
dotted Draws a dotted line.
double Draws two lines as border.
em Relative length value. A em unit is equal to the font-size value of the element used.
groove Groove border value.
Hex color Three two-character numbers in the hexadecimal system(base 16)
hidden Border style occupies space but is not shown.
inset Border style value.
none Does not apply the properties style.
outset Border style value.
px Pixel, a pixel unit represents a single dot on the screen.
RGB decimal Use RGB values from 0 to 255; rgb(255, 0, 333).
RGB percentage Specify a color using percentage values: rgb(100%, 0%, 33%).
ridge Border line style.
solid Draws a solid line.

Related properties

Can be used with..

Search the Soup!