html - Why aren't my circles centering? -


i have circles on webpage represent percentages. there text inside circles percentage amount. there text underneath circles short description. able center text. however, can't center circles. i'm using:

margin-left: auto; margin-right: auto; 

from read online, best way center things on website, makes responsive. tried using percentages circle doesn't either. example, if do:

margin-left: 20%; 

the circle looks centered on iphone 6, not on iphone 5 , 4.

i'm pasting more extensive code below. hope understand problem better.

@media (min-width: 768px) , (max-width: 1024px) {    .ipad-mini-cirlces {      margin-bottom: 100px;    }  }  @media (min-width: 1200px) {    .knob-container canvas {      width: 100px;      height: 100px;    }  }  .circle-text {    margin-left: 107px;    width: 200%;    margin-top: -40px;    text-align: left;  }  @media (max-width: 479px) {    .circle-text {      margin-left: auto;      margin-right: auto;      width: 100%;      margin-top: 100px;      text-align: left;    }  }  @media (max-width: 479px) {    .knob-container {      margin: 27px;      margin-left: auto;      margin-right: auto;      width: 100%;      /*margin-left: 60px;*/    }  }  @media screen , (min-width: 768px) , (max-width: 1200px) {    .circle-text {      margin-left: -20px;      width: 160%;      margin-top: 114px;      text-align: left;    }  }  .knob-container canvas {    margin-left: 20%;  }
<div class="section clearfix">    <div class="container">      <div class="row">        <div class="col-md-12">          <div class="row ipad-mini-cirlces">            <div class="col-md-4 col-sm-4">              <div class="knob-container">                <input class="knob" data-fgcolor="#5cb85c" data-thickness=".1" value="20%" data-displayinput="false" data-readonly="true">                <div class="knob-text">                  <span>10-30%</span>                </div>                <div class="knob-text circle-text">                  <label>saved through improved workflow processes <a href="http://bframe.com/software/security/roi-cost-savings/">find out more</a>                  </label>                </div>              </div>            </div>            <div class="col-md-4 col-sm-4">              <div class="knob-container">                <input class="knob" data-fgcolor="#5bc0de" data-thickness=".1" value="7.5%" data-displayinput="false" data-readonly="true">                <div class="knob-text">                  <span>5-10%</span>                </div>                <div class="knob-text circle-text">                  <label>savings on current cost of reusing of original production material <a href="http://bframe.com/software/security/roi-cost-savings/">find out more</a>                  </label>                </div>              </div>            </div>            <div class="col-md-4 col-sm-4">              <div class="knob-container">                <input class="knob" data-fgcolor="#d9534f" data-thickness=".1" value="15%" data-displayinput="false" data-readonly="true">                <div class="knob-text">                  <span>10-20%</span>                </div>                <div class="knob-text circle-text">                  <label>savings through more polished preparation ahead of edit <a href="http://bframe.com/software/security/roi-cost-savings/">find out more</a>                  </label>                </div>              </div>            </div>          </div>          <br>          <div class="row ipad-mini-cirlces">            <div class="col-md-4 col-sm-4">              <div class="knob-container">                <input class="knob" data-fgcolor="#f0ad4e" data-thickness=".1" value="60%" data-displayinput="false" data-readonly="true">                <div class="knob-text">                  <span>40-80%</span>                </div>                <div class="knob-text circle-text">                  <label>savings on current cost of distributing media <a href="http://bframe.com/software/security/roi-cost-savings/">find out more</a>                  </label>                </div>              </div>            </div>            <div class="col-md-4 col-sm-4">              <div class="knob-container">                <input class="knob" data-fgcolor="#f0ad4e" data-thickness=".1" value="60%" data-displayinput="false" data-readonly="true">                <div class="knob-text">                  <span>40-80%</span>                </div>                <div class="knob-text circle-text">                  <label>savings on current cost of distributing media <a href="http://bframe.com/software/security/roi-cost-savings/">find out more</a>                  </label>                </div>              </div>            </div>            <div class="col-md-4 col-sm-4">              <div class="knob-container">                <input class="knob" data-fgcolor="#8cc63e" data-thickness=".1" value="60%" data-displayinput="false" data-readonly="true">                <div class="knob-text">                  <span>30-50%</span>                </div>                <div class="knob-text circle-text">                  <label>savings on current cost of media storage , handling <a href="http://bframe.com/software/security/roi-cost-savings/">find out more</a>                  </label>                </div>              </div>            </div>          </div>        </div>      </div>    </div>  </div>

your container has full width (obviously). circle should block element (<div>) or display: block; otherwise margin: 0 auto; wont take effect

it's possible give circle display: inline-block; , container text-align: center;


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -