Every guide I find has the line and fill the same colour. All I want is a circle with a red line and white fill.
I have tried:
.circle {
border: red;
background-color: #FFFFFF;
height: 100px;
-moz-border-radius:75px;
-webkit-border-radius: 75px;
width: 100px;
}
But cannot get the red border?
Try this:
You are missing the border width and the border style properties in the Border shorthand property :
Also, You can use percentages for the border-radius property so that the value isn't dependent of the circle width/height. That is why I used 50% for border-radius (more info on border-radius inn pixels and percent here).
Side note : In your example, you didn't specify the border-radius property without vendor prefixes whitch you propably don't need as only browsers before chrome 4 safari 4 and Firefox 3.6 use them (see canIuse).
http://jsbin.com/qamuyajipo/3/edit?html,output
You forgot to set the width of the border! Change
border: red;
toborder:1px solid red;
Here the full code to get the circle:
Here is a jsfiddle so you can see an example of this working.
HTML code:
CSS code: