Created
March 10, 2015 07:39
-
-
Save keeprock/ac7dfd2bbc9fd23d0cb6 to your computer and use it in GitHub Desktop.
Justify text with UL and LI elements using "text-align: justify" property http://www.barrelny.com/blog/text-align-justify-and-rwd/
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 id="Grid"> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
</ul> |
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
#Grid { | |
text-align: justify; | |
font-size: 0.1px; /*hide whitespace between elements*/ | |
} | |
#Grid li{ | |
display: inline-block; | |
width: 23%; | |
} | |
#Grid:after{ | |
content: ''; | |
display: inline-block; | |
width: 100%; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment