HomeReferencesCSS Properties

CSS Property: border-color, border-top-color, border-right-color, border-bottom-color, border-left-color

border-color specifies the color of a boxes complete border.

border-top-color specifies the color of a boxes top border.

border-right-color specifies the color of a boxes right border.

border-bottom-color specifies the color of a boxes bottom border.

border-left-color specifies the color of a boxes left border.

HTML Dog, The Book HTML Dog book cover

HTML Dog is hosted by Titan Internet

Possible Values

  • [color]
  • transparent
  • border-color can have:
    • one value, such as red, to specify the color of the entire border
    • two values, such as red blue, to specify the color of top/bottom (first value) and right/left (second value) borders
    • three values, such as red blue green, to specify the color of top (first value), right/left (second value) and bottom (third value) borders
    • four values, such as red blue green black, to specify the color of top, right, bottom and left borders respectively

Example


.flamingo { border-right-color: red; }

#peach { border-color: #cc3421; }

#tree { border-color: #fc0 blue #cf0; }