<link href="http://www.cssscript.com/demo/circular-progress-bar-plain-html-css/css-circular-prog-bar.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="progress-circle p10">
<span>10%</span>
<div class="left-half-clipper">
<div class="first50-bar"></div>
<div class="value-bar"></div>
</div>
</div>
<div class="progress-circle p20">
<span>20%</span>
<div class="left-half-clipper">
<div class="first50-bar"></div>
<div class="value-bar"></div>
</div>
</div>
<div class="progress-circle p30">
<span>30%</span>
<div class="left-half-clipper">
<div class="first50-bar"></div>
<div class="value-bar"></div>
</div>
</div>
</div>
I use bootstrap 3 and this circle progress bar.
And I work to center 3 progress bar, but It continues to the left.
add the margin, but it occurs break layout in mobile web.
How can I center three progress bars?
I want to center 3 progress bar, and add text under 3 progress bar.
3
Answers
Add margin right and left auto to your progress-circle class, like so:
This shouldn’t break on mobile.
You need to use some of Bootstrap’s grid classes to fix your layout, specifically
col-sm-4
andcenter-block
. See demo below:Example 1:
Use
display:inline-block
in progressbar class.progress-circle
. and addtext-align:center
to parentdiv
Example 2: