Truncating long text without lost text with css

Add the basic css below into your css file:

.elements {
 width: 150px; /* this is the width of text that you want to show, you can handle it */
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}



Usage:

This is example for long text that you want to truncate



csshtml

© 2019 4codev

Created with love by Sil.