In Bootstrap 3, inline forms (http://getbootstrap.com/css/#forms-inline) -
I cannot seem to find the reason for the spacing between .form-group
classes.
fiddle: https://jsfiddle.net/6ek1oa3s/1/
The reason I'm asking is because on my dev environment I have this spacing, but after I build with gulp, in the deployment version - the spacing is gone.
1 - (by default) for classes that set the margin or padding to $spacer * .25. 2 - (by default) for classes that set the margin or padding to $spacer * .5. 3 - (by default) for classes that set the margin or padding to $spacer. 4 - (by default) for classes that set the margin or padding to $spacer * 1.5.
To create a toolbar, wrap more button groups into a . btn-toolbar . No spacing is added automatically between the button groups. To add some spacing to your toolbar, use Bootstrap spacing utilities.
That space is generated by the property inline-block
is compared to treating the elements as text, if you have on your markup each element on a new line this generates a space and each element is a "new word".
Check the Snippet
section {
background:white;
margin:20px auto;
}
div {
display:inline-block;
height:50px;
width:30%;
margin:20px auto;
background:red;
border:thin solid orange
}
<section>
<div></div>
<div></div>
<div></div>
</section>
I guess when you build with gulp you minify your html making your html with no spaces between items and then has no space making all elements "one word".
Check the Snippet
section {
background:white;
margin:20px auto;
}
div {
display:inline-block;
height:50px;
width:30%;
margin:20px auto;
background:red;
border:thin solid orange
}
<section>
<div></div><div></div><div></div>
</section>
To solve this you can add on your style a margin-right
value like:
.form-inline .form-group {
margin-right:4px;
}
Add margin-right or left to your form-group inside your form
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With