forgottofly forgottofly - 8 months ago 17
CSS Question

Align or break work that is appearing out of the panel/div

Below is the screenshot of my div in which I'm printing the name of the employee.But if the name is too long it exceeds the div.
itried by adding

which creates a scroll at the bottom of the div that dosen't look good.
Is there any other solution?Image


Try adding these:

 white-space: nowrap;
 width: <set your width>;
 text-overflow: ellipsis;

To clip your text if it is too long or exceeding the set width. Also adds ... if it exceeds.