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:
Asked
Active
Viewed 4.0k times
7
-
http://jsfiddle.net/W6hEa/1/ works for me, but is probably not what you want – tobspr Aug 05 '13 at 18:25
-
2Personally I think the navbar links look nicer than putting buttons in there, and you can still use the icons if you wish. Otherwise I agree with the margin-left or right. http://jsfiddle.net/W6hEa/3/ – Steve Valliere Aug 05 '13 at 18:39
3 Answers
8
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>

Jens A. Koch
- 39,862
- 13
- 113
- 141
1
You can define spacing inside the class in bootstrap 4.0x.
https://getbootstrap.com/docs/4.0/utilities/spacing/
So for example
<button type="button" class="btn btn-default ml-2>Button</button>

Crabigator360
- 822
- 10
- 9