Mikail Mikail - 5 months ago 26
CSS Question

Bootstrap 3 unclickable inputs when col-xs class applyed

when I apply class col-xs-5 to my input it becomes un-clickable. And it only un-clickable on small screens, on big screens it works fine.

<form action="" method="POST" role="form" class="col-lg-12 clearfix" style="padding: 0px;">




<div class="form-group col-lg-1 col-lg-offset-0 col-md-1 col-md-offset-0 clearfix col-xs-5" style="padding: 0px;">

<label for="">Badrooms</label>

<select name="" id="input" class="form-control" style="padding: 2px 2px;" >
@foreach([1,2,3,4,5,6,7,8,9,10] as $arr)
<option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option>
@endforeach
</select>
</div>
<div class="form-group col-lg-1 col-lg-offset-1 col-md-1 col-md-offset-1 clearfix col-xs-5 col-xs-offset-2" style="padding: 0px;">
<label for="">Bathrooms</label>

<select name="" id="input" class="form-control" style="padding: 2px 2px;" >
@foreach([1,2,3,4,5,6,7,8,9,10] as $arr)
<option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option>
@endforeach
</select>
</div>


<div class="form-group col-lg-3 col-lg-offset-2 col-md-3 col-md-offset-2 clearfix" style="padding: 0px;">
<label for="">Type</label>

<select name="" id="input" class="form-control" style="padding: 2px 2px;" >
@foreach(ListingTypeDB::all() as $type)
<option value="{{{$type->id}}}">{{{$type->type_name}}}</option>
@endforeach
</select>
</div>

<div class="form-group col-lg-2 col-lg-offset-2 col-md-2 col-md-offset-2 clearfix" style="padding: 0px;">
<label for="">Rent/Buy</label>

<select name="" id="input" class="form-control" style="padding: 2px 2px;" >

<option value="1">Rent</option>
<option value="0">Buy</option>

</select>
</div>


</form>


I tryed to wrap my form-group snippets into .row it becomes clickable but it messes everything see the picture : enter image description here

thank You.

GSB GSB
Answer

You can edit your code as shown below

<div class="row">
            <div class="form-group col-sm-6" >

             <div class="form-group col-sm-5" >
                        <label for="">Badrooms</label>
                    </div>

                   <div class="form-group col-sm-7" >
                        <select name="" id="input" class="form-control"  >
                            @foreach([1,2,3,4,5,6,7,8,9,10] as $arr)
                               <option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option>
                            @endforeach
                        </select>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="form-group col-sm-6" >
               <div class="form-group col-sm-5" >
                    <label for="">Bathrooms</label>
               </div>
                <div class="form-group col-sm-7" >
                    <select name="" id="input" class="form-control" >
                        @foreach([1,2,3,4,5,6,7,8,9,10] as $arr)
                           <option value="">{{{$arr == 10 ? '10 >' : $arr}}}</option>
                        @endforeach
                    </select>
                </div>
                    <div class="clearfix"></div>

            </div>
    </div>

        <div class="row">
          <div class="form-group col-sm-6 " >
               <div class="form-group col-sm-5" > 
                    <label for="">Type</label>
                </div>

              <div class="form-group col-sm-7" >  
                    <select name="" id="input" class="form-control" >
                        @foreach(ListingTypeDB::all() as $type)
                           <option value="{{{$type->id}}}">{{{$type->type_name}}}</option>
                        @endforeach
                    </select>
                </div>
                <div class="clearfix"></div>

            </div>

            <div class="form-group col-sm-6 ">
               <div class="form-group col-sm-5" > <label for="">Rent/Buy</label></div>

               <div class="form-group col-sm-7" > <select name="" id="input" class="form-control" >

                       <option value="1">Rent</option>
                       <option value="0">Buy</option>

                </select></div>
                    <div class="clearfix"></div>

            </div>
        </div>

Using these css classes your clickable issue has been solved.I am attaching screenshot for your referenceenter image description here

Comments