I have a set of buttons (made with <a></a>
or button
the effect is the same) which are inline-block
elements.
When I put many of them inline, spacing between them is not even. Every other button have different spacing.
Please note that I am not trying to remove the space between buttons, I want it to be even.
The difference is about 1px
between first and second button, but second and third have as it appears to be 2px
spacing. The pattern then continues. I put black and arrow on matched spacings so you can see the pattern.
CSS
.btn,
button,
input[type='button'],
input[type='reset'],
input[type='submit'] {
@include transitions;
display: inline-block;
overflow: visible;
margin: ($baseline/2) 0;
padding: .6em 2em;
background: $default;
color: #fff;
text-decoration: none;
vertical-align: top;
-webkit-appearance: none;
outline: none;
border: 0;
cursor: pointer;
zoom: 1;
}
HTML
<a class="btn bg-green" href="#" role="button">Download</a>
<a class="btn bg-yellow" href="#" role="button">Download</a>
<a class="btn bg-red" href="#" role="button">Download</a>
<a class="btn bg-blue" href="#" role="button">Download</a>
<a class="btn bg-silver" href="#" role="button">Download</a>
<a class="btn bg-gray" href="#" role="button">Download</a>
Here you can see better how spacing is uneven