html5 - HTML: How can i do this...! -
i developing application have display names of users in following structure :
in above structure, in name field, may exceed right border of outer <div>
tag, want cut name value before touches right border , append string '...' in end below
how can make work utf-8, unicode or normal english letters in name field?
p.s. m using php server side processing.
the easiest way set css on div...
<div style="white-space:nowrap; text-overflow:ellipsis;">er. christopher allen (christallenmoretextmoretext)</div>
you have set white-space
attribute well, otherwise won't ever elipsis point. should set overflow:hidden
.
big caveat though! not work in browsers. ie7 , beyond, safari/chrome, fine. believe there issues in firefox though.
edit: here firefox workaround. not amazing though.
Comments
Post a Comment