Created
March 20, 2012 12:42
-
-
Save gpassarelli/2134845 to your computer and use it in GitHub Desktop.
CSS: Horizontal Centered List
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
#centeredmenu { | |
float:left; | |
width:100%; | |
overflow:hidden; | |
position:relative; | |
} | |
#centeredmenu ul { | |
clear:left; | |
float:left; | |
list-style:none; | |
margin:0; | |
padding:0; | |
position:relative; | |
left:50%; | |
text-align:center; | |
} | |
#centeredmenu ul li { | |
display:block; | |
float:left; | |
list-style:none; | |
margin:0; | |
padding:0; | |
position:relative; | |
right:50%; | |
} | |
#centeredmenu ul li a { | |
display:block; | |
padding:0 10px; | |
text-decoration:none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment