border-color
The border-color CSS property is a shorthand for setting the color of the four sides of an element’s border: border-top-color, border-right-color, border-bottom-color, border-left-color
Values
color | Is a <color> denoting the color to apply to all four edges. It is used only in the one-value syntax. |
horizontal | Is a <color> denoting the color to apply to all horizontal edges, that is the top and bottom edges. It is used only in the two-value syntax. |
vertical | Is a <color> denoting the color to apply to all vertical edges, that is the right and left edges. It is used only in the two- and three-value syntaxes. |
top | Is a <color> denoting the color to apply to the top edge. It is used only in the three- and four-value syntaxes. |
bottom | Is a <color> denoting the color to apply to the bottom edge. It is used only in the three- and four-value syntaxes. |
right | Is a <color> denoting the color to apply to the top edge. It is used only in the four-value syntax. |
left | Is a <color> denoting the color to apply to the top edge. It is used only in the four-value syntax. |
inherit | Is a keyword indicating that all four values are inherited from their parent’s element calculated value |
Example
<!DOCTYPE HTML> <html> <head> <title>CSS Tutorials</title> <style> div { border-style: ridge dashed solid; border-color: orange blue; width: 200px; height: 200px; } </style> </head> <body> <div> </div> </body> </html>