Last active
August 29, 2015 14:09
-
-
Save jamalkhan2k6/6a5ff5fd6c06a04ba799 to your computer and use it in GitHub Desktop.
Make the li's fit inside ul (great for sliders) through CSS (no js)
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
/*lis will always be inline*/ | |
ul { | |
width: 100%; | |
display: table; | |
table-layout: fixed; /* optional */ | |
} | |
ul li { | |
display: table-cell; | |
width: auto; /* can be a number too */ | |
text-align: center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment