div with display inline & span not working with text-overflow ellipsis
-
sorry, some nested html messed up my last post about this. Heres my 2nd attempt to post this. ******************************* Hi, I have text like this: text that is very very very long and this text on same line to follow ellipsis It needs to be displayed in Intenet Explorer like this: text that is ... and this text on the same line to follow ellipsis. I have tried div and span tags, all give me the same problem, either the text has a line break after ellipsis, or the text does not break, but there are no ellipsis. What I've tried: 1.
text that is very very long
and this text on the same line to follow ellipsis 2.
-
sorry, some nested html messed up my last post about this. Heres my 2nd attempt to post this. ******************************* Hi, I have text like this: text that is very very very long and this text on same line to follow ellipsis It needs to be displayed in Intenet Explorer like this: text that is ... and this text on the same line to follow ellipsis. I have tried div and span tags, all give me the same problem, either the text has a line break after ellipsis, or the text does not break, but there are no ellipsis. What I've tried: 1.
text that is very very long
and this text on the same line to follow ellipsis 2.
shefali_sinha wrote:
text that is very very longand this text on the same line to follow ellipsis
Try:
<span style="display:inline-block; width:30px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden;">text that is very very long</span> and this text on the same line to follow ellipsis
Note: this will only work in IE. Mozilla does not support either
display:inline-block
ortext-overflow:ellipsis
. Opera does supportdisplay:inline-block
, but nottext-overflow:ellipsis
, so the first text will be cut off, but there will be no ellipsis between it and the second text.---- I just want you to be happy; That's my only little wish...