# Property Description

The border-style shorthand property sets all of the border styles in one declaration. This property can accept from one to four values.

    border-style:
      <top> <right> <bottom> <left>

If all four values are provided, the border styles are as specified.

    border-style:
      <top> <right/left> <bottom>

If three values are provided, right and left border styles are set as middle value.

    border-style:
      <top/bottom> <right/left>

If two values are provided, top and bottom border style are set as the first value, right and left border style are set as second value.

    border-style:
      <top/right/bottom/left>

If one value is provided, all four border style values are set the same.

# Property Values

Value | Description
--- | ---
none | Specifies no border
hidden2 | The same as "none", except in border conflict resolution for table elements
dotted | Specifies a dotted border
dashed | Specifies a dashed border
solid | Specifies a solid border
double | Specifies a double border
groove | Specifies a 3D grooved border. The effect depends on the border-color value
ridge | Specifies a 3D ridged border. The effect depends on the border-color value
inset | Specifies a 3D inset border. The effect depends on the border-color value
outset | Specifies a 3D outset border. The effect depends on the border-color value
inherit1 | Specifies that the value of the property should be inherited from the parent element

# Examples

This example sets the style of all four borders.

    p {
      border-style:solid;
    }

This example shows the results of setting the various border-style values:

    border-style:none

    border-style:dotted

    border-style:dashed

    border-style:solid

    border-style:double

    border-style:groove

    border-style:ridge

    border-style:inset

    border-style:outset

# Browser Support

Firefox | IE | Chrome | Opera | Safari

1 - 'inherit' not supported by IE

2 - 'hidden' not supported by IE

# Miscellaneous Information

Inherited: | No
Defined In: | CSS1