gitbrent / bootstrap4-toggle

Bootstrap 4 Switch Button / Toggle
https://gitbrent.github.io/bootstrap4-toggle/
MIT License
214 stars 67 forks source link

Doesn't render correctly when using Input Group #32

Open daniel-scatigno opened 4 years ago

daniel-scatigno commented 4 years ago

When using inside an input-group the Off button doesn't render corretly Example:

                  <div class="form-group">
                    <div class='input-group'>
                        <input type="hidden" name='' value="" />
                        <input type='text' class='form-control telefone' />
                        <div class='input-group-append'>
                          <div class='input-group-btn'>
                            <input type='checkbox' class="" data-toggle='toggle'
                             value="true" data-off="Não" data-on="Sim">
                            <input type='hidden'  value="false" />
                          </div>
                      </div>
                    </div>
                  </div>
bryan-brancotte commented 4 years ago

I had the same issue, and fixed it:

.input-group .input-group-btn .toggle-on,
.input-group .input-group-btn .toggle-off{
    position: absolute;
}