ghinda / css-toggle-switch

Accessible, CSS-only, toggle switches

Home Page:http://ghinda.net/css-toggle-switch/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Toggle Spacing

gardnersm opened this issue · comments

Is there a way to remove the padding or margins from the toggle?

image

The borders were added to see where spacing was coming from.

<!-- Question 1 --> <div class="row row-centered"> <div class="col-lg-3 hidden-xs"></div> <div class="col-lg-3 col-xs-8 text-left" style="line-height:32px; border:1px solid red;">Did you install a ground block?</div> <div class="col-lg-3 col-xs-4 text-right" style="line-height:32px; border:1px solid red;"> <label class="switch-light" onclick="" style="border:1px solid green; margin:0;"/> <input type="checkbox" style="margin:0"> <span class="well"> <span>Off</span> <span>On</span> <a class="btn btn-primary"></a> </span> </label> </div> <div class="col-lg-3 hidden-xs"></div> </div> <!-- / Question 1 -->

The margin is coming from Bootstrap's .well. So this will do the trick:

.switch-light .well {
  margin: 0;
}

http://jsbin.com/loqere/edit?html,css,output