I am trying to achieve UI as shown in the image. However I am having little hard time after trying combinations of positioning now I am clueless. Can someone help me with this?
<style>
.progress{
position:relative;
width:500px;
}
.bar{
}
.percent{
}
</style>
<div class="progress">
<span class="bar" width="%"></span>
<span class="percent">50%</span>
</div>
To change % dynamically here is code
HTML
CSS
You'll have to play around with the font-size and padding to get it just right, but that should about do it.
HTML:
CSS:
Sample here: http://jsfiddle.net/WawPr/
Just change the onclick function as follows and you will have an animated version of the accepted solution
http://jsfiddle.net/Zfzva/418/ can see it here.
thanks to
https://stackoverflow.com/a/5865894/2815227
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_progressbar_3
Take this example....
HTML CODE:
CSS
JQUERY:
I did half the work for you.
You can mess with the widths, margins, paddings! I got lazy, and didn't want to finish it. lol