Reputation: 83
I am trying to group 3 of my fields into the one row using the col-sm-4
class, however I am having issues with how the row is being displayed. It is appearing off-center and not within the column as seen below.
The code for my form is the below:
<div class="hb-comment__form">
<h3 class="h3-header">Make a Booking</h3>
<div class="row">
[response]
<div class="col-sm-12">
[text* your-name class:input__field class:size-2 placeholder "Your Name"]
</div>
<div class="col-sm-12">
[email* your-email class:input__field class:type-2 class:size-2
placeholder "Your Email"]
</div>
<div class="col-sm-12">
[tel* telephone_number class:input__field class:type-2 class:size-2
placeholder "Your Phone Number"]
</div>
<div class="row">
<div class="contactFormPickers">
<div class="row">
<div class="col-sm-5">
<label>
Arrival Date :[date* Arrival_Date class:input__field class:type-2
class:size-2]
</label>
</div>
<div class="col-sm-5">
<label>
Depart Date: [date* Depart_Date class:input__field class:type-2
class:size-2]
</label>
</div>
<div class="col-sm-2">
<label >
Guests: <br />
[select* no_of_guests class:input__field class:type-2 class:size-2 class:guest-picker include_blank "2" "3" "4" "5" "6" "7" "8" "9" "10"]
</label>
</div>
</div>
</div>
</div>
</div>
[textarea* your-message class:input__field class:type-2 class:size-2
placeholder x5 "Your Message"] [recaptcha] [submit class:btn class:mb-0
class:btn--normal class:btn--md "Submit Booking"]
And the custom css class "contactFormPickers" is the below:
.contactFormPickers{
text-align:center;
margin: auto 0;
}
Any help fixing the above issue would be greatly appreciated
Upvotes: 0
Views: 740
Reputation: 67778
So this apparently is a bootstrap issue. You are wrapping these three elements twice into .row
elements (which add certain margin and padding settings) - You should erase at least one of these .row
layers.
Also, you might consider to erase the .contactFormPickers
layer if you don't really need it.
Upvotes: 1