I have a text that needs to be truncated in some defined length (say 14) and I want to add an ellipses to the end of the truncated text.
Example Output:
Some text here...
Can this be done in CSS?
Css dont know the number of characters. It only knows box model. In a project i had worked on elipses with css but it is worst idea. For a better approach use javacript.
@mixin ellipsisMe { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .selector { @include ellipsisMe; }