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?
You can give any element “rounded corners” by applying a border-radius through CSS. You'll only notice if there is a color change involved. For instance, if the element has a background-color or border that is different than the element it's above.
Style your corners. The border-radius CSS property is what adds the rounded corners. You can experiment with different values to get it the way you like. border-radius: 75px; If you want it to be a circle, add border-radius: 50%; .
You forgot to set the width of the border! Change border: red;
to border:1px solid red;
Here the full code to get the circle:
.circle { background-color:#fff; border:1px solid red; height:100px; border-radius:50%; -moz-border-radius:50%; -webkit-border-radius:50%; width:100px; }
<div class="circle"></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With