I have a div with 3 elements (h2's). The div is 100% but when I set the width for each h2 inside the div to 33.33% the 3rd div will go down a line. 33% works, but then I have extra space left which is almost unnoticeable, but is still a problem for me. How do I fix this so the 3 h2's fit inside a 100% div so that the first h2 aligns to the left, the second centers in the middle, and the last one aligns to the right? Maybe even without having to use numbers, such as 33.33%?
This is what I have so far:
HTML:
<div class="col-md-12 bottomPadding">
<h2 class="floatLeftBottom"><a href="/">Edit</a></h2>
<h2 class="floatCenterBottom"><a href="/">Delete</a></h2>
<h2 class="floatRightBottom"><a href="#">Move up</a></h2>
</div>
CSS:
.floatLeftBottom {
display: inline-block;
width: 33%;
text-align: left;
padding-bottom: 10px;
}
.floatCenterBottom {
display: inline-block;
width: 33%;
text-align: center;
padding-bottom: 10px;
}
.floatRightBottom {
display: inline-block;
width: 33%;
text-align: right;
padding-bottom: 10px;
}