Reputation: 1997
Have a look at the below example in Mobile
mode.
In Fieldset 3
, why is there a slight padding
on the left for all the labels and textboxes.
Upvotes: 0
Views: 94
Reputation: 11675
Like the below answer states, you have given col-md-6
class along with your form-group
for Fieldset 3. Now since you do need the col-md-6
to separate the elements into 2 columns, you could target that specific fieldset and remove the padding.
HTML:
<form class="form-horizontal" id="fieldset3"> <!-- ID added -->
<fieldset>
<legend>Fieldset 3</legend>
CSS:
#fieldset3 .col-md-6{
padding-left:0px;
}
To make it easier you can also group the labels this way:
<div class="col-md-6">
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
<div class="form-group">
<!-- Label and input here -->
</div>
</div>
Upvotes: 2
Reputation: 725
Cause you nestind classes for columns. First you have div.col-md-6.form-group
, and inside you have label.control-label.col-md-8
, so it doubles the padding for col-*
.
Upvotes: 2