this is my css snippet
.test{ width:150px; height:60px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -o-text-overflow: ellipsis; }
what is he doing ...
the quick brown fo...
I want to
the quick brown fox jumps over the lazy dog. the quick br...
Is there a way to do this with CSS only? or i need to use javascript for this. If javascript is needed, can anyone teach me how to do this? thanks!
UPDATE
I tried removing white-space: nowrap; and added overflow-y: hidden; he gives me a 3 line layout, but not an ellipsis
.test{ width:150px; height:60px; overflow-y: hidden; text-overflow: ellipsis; -o-text-overflow: ellipsis; }
source share