Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase radio button size in bootstrap

How do increase the default size of my radio buttons given by bootstrap? Here is fiddle link https://jsfiddle.net/thomassuckow/a815d1yz/

html
    <form >
        <div class="row">
            <div class="col-sm-3">Test 1 - Bootstrap</div>
            <div class="col-sm-9">
                <div class="btn-group" data-toggle="buttons">
                    <label class="btn btn-default active">
                        <input type="radio" id="q156" name="quality[25]" value="1" checked="checked" /> Normal
                    </label> 
                    <label class="btn btn-default">
                        <input type="radio" id="q157" name="quality[25]" value="2" /> History
                    </label>
                </div>
            </div>
        </div>
    </form>

I have used the required bootsrap js, css and fonts.

like image 290
Saurabh Kumar Singh Avatar asked Jan 05 '18 10:01

Saurabh Kumar Singh


2 Answers

You can increase height and width.

input[type=radio] {
    width: 30px;
    height: 30px;
}

Or you can use transform scale

input[type=radio]{
  transform:scale(1.5);
}

label:first-child input[type=radio] {
  width: 30px;
  height: 30px;
}

label:last-child input[type=radio] {
  transform: scale(1.5);
}
<form>
  <div class="row">
    <div class="col-sm-3">Test 1 - Bootstrap</div>
    <div class="col-sm-9">
      <div class="btn-group" data-toggle="buttons">
        <label class="btn btn-default active">
          <input type="radio" id="q156" name="quality[25]" value="1" checked="checked" /> Normal
        </label>
        <label class="btn btn-default">
          <input type="radio" id="q157" name="quality[25]" value="2" />History
          </label>
      </div>
    </div>
  </div>
</form>
like image 156
Abhishek Pandey Avatar answered Sep 21 '22 09:09

Abhishek Pandey


Add css radio button #id in transform:scale(..)

input#q156 {
   transform: scale(2);
}

input#q156 {
   transform: scale(2);
}
<form>
  <div class="row">
    <div class="col-sm-3">Test 1 - Bootstrap</div>
    <div class="col-sm-9">
      <div class="btn-group" data-toggle="buttons">
        <label class="btn btn-default active">
          <input type="radio" id="q156" name="quality[25]" value="1" checked="checked" /> Normal
        </label>
        <label class="btn btn-default">
          <input type="radio" id="q157" name="quality[25]" value="2" />History
          </label>
      </div>
    </div>
  </div>
</form>
like image 34
Nims Patel Avatar answered Sep 19 '22 09:09

Nims Patel