vadnica-logo
X

CSS Property: border-color

The border-color property sets the color of the four borders of an element. This property can have one to four values.

EXAMPLE
RESULT

If the property has four values: border-color: orange, yellow, greenyellow, blue; it means:

  1. The top border is orange.
  2. The right border is yellow.
  3. The bottom border is greenyellow.
  4. The left border is blue.

If the property has three values: border-color: orange, yellow, blue; it means:

  1. The top border is orange.
  2. The right and left borders are yellow.
  3. The bottom border is blue.

If the property has two values: border-color: orange, yellow; it means:

  1. The top and bottom borders are orange.
  2. The right and left borders are yellow.

If the property has one value: border-color: orange; it means:

  1. All four borders are orange.

The border-style property must always be declared before the border-color property because the element needs to have borders before we can set their colors.

Thank you for visiting! Adding privacy policy.

© 2024 All rights reserved.

Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.