CSS Border Color

The CSS-border-color property defined as it allows you to set the border color of a box or div of the element.

CSS-border-color property can be set as border-color, and also can set them individually for border-top-color, border bottom-color, border-right-color, and border-left-color.

means that If you want to specify or set a CSS-border-color for a few sides (not all sides).

you can use one or more of those properties as above color-property.

one thing more than in these case one thing more you will be the check that border-width is not 0 and that border-style is set to none or

hidden before the border is displayed.

Border-color same for all sides

Border-color same for all sides

In the example, you can see that border-color green which is shown in the output image and border width 10px

which is the solid border. border-color for four side same which is used green color. then all border-color decorated

with green color.

Border-color with two sides the same color


Border-color with two sides the same color

As a result, in this example you can see that in out image the border color for top border and bottom border have the same color but for the left border and right border have the same colors, means that two border sides have the same color, top, and bottom border color is #FF5733 and left and right border color is #ACFF33 you can decorate all four border with two colors as seen in the above example.

Border-color with all four sides a different color


Border-color with all four sides a different color

therefore, In the above example for border-color different for all four sides, you can see that all four borders have a different color, for color top border color#FF5733 right-border color #ACFF33bottom border-color #FFEC33 left border-color to #A4971Bhave a different color. means that you can decorate all four border with different color as according to your needs.