Created
November 1, 2012 20:23
-
-
Save NapoleonWils0n/3996233 to your computer and use it in GitHub Desktop.
css: center align left floated elements
This file contains hidden or 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
ul { | |
margin: 20px; | |
padding: 0; | |
list-style-type: none; | |
text-align: center; | |
} | |
li { | |
display: inline-block; | |
margin: 0; | |
padding: 0; | |
list-style-type: none; | |
} | |
li a { | |
text-decoration: none; | |
color: #555; | |
padding: 4px 6px; | |
border: 1px solid #ccc; | |
margin: 0 4px; | |
} | |
li a:hover { | |
border: 1px solid #999; | |
color: #333; | |
background-color: #f2f2f2; | |
} | |
* html li { display: inline; } | |
*+html li { display: inline; } | |
li a { | |
text-decoration: none; | |
color: #555; | |
padding: 4px 6px; | |
border: 1px solid #ccc; | |
margin: 0 4px; | |
zoom: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment