CSS border-style property

Usage

Sets the border style(s) for an element. Can take one to four values depending on how many different styles you wish to use.

Variations

  • border-top-style
  • border-right-style
  • border-bottom-style
  • border-left-style

Values

  • none
  • hidden
  • dotted
  • dashed
  • solid
  • double
  • groove
  • ridge
  • inset
  • outset

Example

Code:

/* All borders dotted */
div { border-style: dotted }

/* Top and bottom dotted, left and right solid */
div { border-style: dotted solid }

/* Top dotted, left and right solid, bottom dashed */
div { border-style: dotted solid dashed }

/* Top dotted, right solid, bottom dashed, left double */
div { border-style: dotted solid dashed double }