How can I make space between buttons in navbar? I usually do that with
but it doesn't work now. Here's an JSfiddle of how it looks:
http://jsfiddle.net/W6hEa/
You can achieved by use bootstrap Spacing. Bootstrap Spacing includes a wide range of shorthand responsive margin and padding. In below example mr-1 set the margin or padding to $spacer * .
As of Bootstrap 4, you can use the spacing utilities. Add for instance px-2 in the classes of the nav-item to increase the padding.
In CSS, select the B1 class and set its margin-right property to 4px . This will create a 4px space to Button 1 right, creating a space between the two buttons.
you may try margin-left
here is the code
.btn{
margin-left:10px;
}
here is the example:: FIDDLE
Copy & paste this to your style.css
and assign it as class attribute:
.btn-margin-left {
margin-left: 2px;
}
.btn-margin-right {
margin-right: 2px;
}
Usage
<a href="URL" class="btn btn-default btn-sm btn-margin-left">Link</a>
<button type="button" class="btn btn-default btn-sm btn-margin-left">Button</button>
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