CSS border-color Property
The CSS border-color property is shorthand CSS to specify a border color for all sides of an HTML element. Specify one color value to make all borders the same colors. Specify two color values to make right-left and top-bottom different colors. Specify four color values to independently color each side. The other CSS shorthand properties work in a similar way allowing you to target particular sides if needed.
red, green, blue, etc...
RGB Color Value
rgb(0,0,255), rgb(0,255,0), rgb(255,0,0), etc...
Hexidecimal Color Value
#FF0, #009900, #0099FF, etc...
CSS CODE EXAMPLE
<style type="text/css">
div#myDiv {
border-color: #10D6C1;
border-style: ridge;
background: #C9FCF4;
padding: 12px;
}
div#myOtherDiv {
border-color: #F0F #0FF #0F0 #F00;
border-style: solid ridge double inset;
border-width: 8px 12px 16px 20px;
padding: 12px;
}
</style>
<div id="myDiv">div content ...</div>
<hr />
<div id="myOtherDiv">div content ...</div>
div#myDiv {
border-color: #10D6C1;
border-style: ridge;
background: #C9FCF4;
padding: 12px;
}
div#myOtherDiv {
border-color: #F0F #0FF #0F0 #F00;
border-style: solid ridge double inset;
border-width: 8px 12px 16px 20px;
padding: 12px;
}
</style>
<div id="myDiv">div content ...</div>
<hr />
<div id="myOtherDiv">div content ...</div>
div content ...
div content ...
Possible Values:
Simple Color Namered, green, blue, etc...
RGB Color Value
rgb(0,0,255), rgb(0,255,0), rgb(255,0,0), etc...
Hexidecimal Color Value
#FF0, #009900, #0099FF, etc...
0 Response to "border-color"
Post a Comment