Created
October 26, 2017 11:17
-
-
Save bryandh/7f846ef0ae8e0074da47ba7200dba1c2 to your computer and use it in GitHub Desktop.
Truncate text with dots in CSS
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
.truncate { | |
width: 250px; // Not required as container's width is usually sufficient | |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment