Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put a label to right of a checkbox in bootstrap

I've been trying lots of ways to put a <input type="checkbox" id="123"/> infront of a label, but they're leaving a huge gap between theirselves. Any workaround? Here's my html:

<div class="row">
    <div class="col-sm-6">
        <div class="input-group input-group-sm">
            <input type="checkbox" id="ProcessingConsultantYN" value="0" />
            <label class="input-group-addon input-group-addon-pireus" aria-describedby="ProcessingConsultantYN" id="lbProcessingConsultant" for="ProcessingConsultantYN">Обработва се от Кредитен Консултант</label>
        </div>
    </div>
</div>

Here's how it looks when being displayed on the website and what I actually want to fix: enter image description here

like image 940
Alexander Hristov Avatar asked Nov 15 '25 20:11

Alexander Hristov


1 Answers

Try below Code Just replace your label tag class with checkbox-inline.

<div class="row">
  <div class="col-sm-6">
    <div class="input-group input-group-sm">
      <input type="checkbox" id="ProcessingConsultantYN" value="0" />
      <label class="checkbox-inline" aria-describedby="ProcessingConsultantYN" id="lbProcessingConsultant" for="ProcessingConsultantYN">Обработва се от Кредитен Консултант</label>
    </div>
  </div>
</div>
like image 118
Shubham Baranwal Avatar answered Nov 18 '25 10:11

Shubham Baranwal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!