CSS Property Border-Color Not Working

Zeb-ur-Rehman picture Zeb-ur-Rehman · Jan 4, 2013 · Viewed 43k times · Source

I have issue with border-color. It didn't work. I'm new to css here is the fiddle. http://jsfiddle.net/zeburrehman/aFzKy/151/

<div id="box">
Hello! The color of box border should be red!!
</div>​

#box {
border-color: red;
}​

Answer

Ashwin picture Ashwin · Jan 4, 2013

By default the border-width is 0 and border-style is none

So you need to set them to border-width:1px and border-style:solid. You can combine all the border properties into one as below:

#box {
    border:1px solid red
}