In my application, I am trying to have several conecutive labels, like in this jsbin:
Instead, I am getting this:
As you can see, no spacing is present between the labels. This is probably because of a problem in my CSS, but I am unable to find the culprit.
Where is the spacing between labels defined in bootstrap? Knowing that would allow me to narrow the bug-search in my CSS.
using . form-group{ margin-bottom: 20px;} works, but best to use bootstrap's builtin and put .
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.
Additionally, Bootstrap also includes an .mx-auto class for horizontally centering fixed-width block level content—that is, content that has display: block and a width set—by setting the horizontal margins to auto . Centered element.
This has nothing to do with your CSS at all. Just add a space or break the line between your ".label" tags.
This happened to me when the framework I use started to compress the HTML in order to save some bytes.
You can see this effect on this jsbin.
You need to remove the space from inside the label.
The following spans have no space between each other:
<span class="label label-primary"> Primary </span> <span class="label label-default"> Default </span>
The following spans have the correct spacing between them:
<span class="label label-primary">Primary</span> <span class="label label-default">Default</span>
Notice that the leading/trailing white space must be removed from inside the span element for them to work correctly.
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