Partial circular border using CSS

Viewed 1866

I want to create a partial circular border around an element using pure css. I've been able to achieve the effect to a certain extent in this: http://jsfiddle.net/5MZMj/202/ However, this removes 25% or the border, How do I remove just 5% or say 20% ? Also, how do I rotate the border (without rotating the content inside)?

Code in jsfiddle:

HTML:

<div class="one">
    <div class="two">4.5</div>
</div>

CSS:

.two {
    font-size: 24px;
    display:inline;
    padding-bottom:5px;
}
.one {
    padding: 10px;
    border: 1px solid green;
    border-radius: 25px;
    border-top-color: transparent;
    width:30px;
    margin-left: 10px;
}

Edit: image to give an idea of the effect I'm trying to achieve: http://imgur.com/JU78ICT Edit2: sorry, I just realized I had linked the wrong jsfiddle, correct one is: http://jsfiddle.net/5MZMj/202/

5 Answers
Related