Last active
December 16, 2015 21:50
-
-
Save robspangler/5502975 to your computer and use it in GitHub Desktop.
Center a floating list navigation / pagination Sample HTML:
<div id="pagination" class="centered-list"> <ul class="page-numbers clearfix"> <li><a class="prev" href="#prev">Prev</a></li> <li><a href="#1">1</a></li> <li><a href="#2">2</a></li> <li><a class="next" href="#next">Next</a></li> </ul>
</div>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Centered List Items*/ | |
.centered-list { float: left; width: 100%; overflow: hidden; position: relative; } | |
.centered-list ul { clear: left; float: left; position: relative; left: 50%; text-align: center; } | |
.centered-list ul li { float: left; position: relative; right: 50%; list-style: none; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment