I have div
with the following css style:
width:335px; float:left; overflow:hidden; padding-left:5px;
When I insert, into that
I was able to achieve this by using the webkit-line-clamp
and the following css:
div {
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
}
if addition please, if you have a long text please you can use this css code bellow;
text-overflow: ellipsis;
overflow: visible;
white-space: nowrap;
make the whole line text visible.