Created
October 22, 2014 17:40
-
-
Save webbower/71d84dace72c621e4aa5 to your computer and use it in GitHub Desktop.
CSS ellipsis truncation
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
/* http://frontendbabel.info/articles/css-tricks-by-wargaming/ */ | |
.text-overflow { | |
white-space: nowrap; /* No line breaks */ | |
overflow: hidden; /* Hide text which does not fit the block */ | |
text-overflow: ellipsis; /* Cut off with ellipsis */ | |
display: block; /* Works only for block elements */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment