How do I center floated elements?

Removing floats, and using inline-block may fix your problems: .pagination a { – display: block; + display: inline-block; width: 30px; height: 30px; – float: left; margin-left: 3px; background: url(/images/structure/pagination-button.png); } (remove the lines starting with – and add the lines starting with +.) .pagination { text-align: center; } .pagination a { + display: inline-block; width: … Read more