html5 - HTML: How can i do this...! -


i developing application have display names of users in following structure :

enter image description here

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

enter image description here

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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -