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;


This is example for long text that you want to truncate


© 2019 4codev

Created with love by Sil.