border

Defines the border properties for an element.

Platform Support

IENetscapeMozillaOperaSafari
4.0+4.0+1.0+5.0+1.0+
  • IE: IE does not support borders on table columns.

Usage

[color] [style] [width]

Values

*Specify a border value not on this list.
inheritInherit the value from the parent element.
#ffffffborder-color: Border color placeholder. e.g. #ffffff = white
noneborder-style: No border.
dottedborder-style: Dotted line.
dashedborder-style: Dashed line.
solidborder-style: Solid line.
doubleborder-style: Double line.
grooveborder-style: Grooved line.
ridgeborder-style: Ridged line.
insetborder-style: Inset line.
outsetborder-style: Outset line.
hiddenborder-style: Hidden border.
thinborder-width: Thin border.
mediumborder-width: Medium border.
thickborder-width: Thick border.

Example

To specify a thick, red, dashed border, use the following syntax: .myborderclass {border: thick red dashed;}.

For additional information and a demonstration of the border attribute, see the demo page on quirksmode:

http://www.quirksmode.org/css/columns.html#border

Remarks

Use the border property as a shortcut to typing out all of the individual border properties separately. You can specify any valid value for a border- property as part of border.

Availability

W3C CSS2

Related

text_css aptana_docs