CSS border-color property

Usage

Specifies a color for an element border. You can specify the same color for all borders of give individual colors to each border.

Variations

  • border-top-color
  • border-right-color
  • border-bottom-color
  • border-left-color

Values

  • [color] - you can specify up to four colors depending on how many different colors you want to specify, see the examples for clarification

Example

Code:

/* Same border color on all sides */
div { border-color: blue }

/* Top and bottom borders red, left and right blue */
div { border-color: red blue }

/* Top red, left and right blue, bottom orange */
div { border-color: red blue orange }

/* Top red, right blue, bottom orange, left green */
div { border-color: red blue orange green }