Give the ul
element a width - in this case it would be 600px, as you have 5 buttons * 105px width and 15px margin for each button. Removing the padding set on the ul
and the left and right values set on the li
, and give the ul
element this style:
.shortcut-buttons-set {
margin: 0 auto;
padding: 0;
width: 600px;
}
ul.shortcut-buttons-set li {
float: left;
font-weight: bold;
margin: 0 15px 0 0;
padding: 0 !important;
text-align: center;
}
Additionally, you'll want to use :last-child
to remove the last 15px margin, so that the buttons are perfectly aligned.
.shortcut-buttons-set li:last-child {
margin: 0;
}
Taking this into account, the width for the ul
should now be 585px.