[thelist] Is there a way to calculate what the width of a displayed word?

Ivo P ipletikosic at gmail.com
Mon Oct 17 11:58:07 CDT 2005


I have a list of words, any of which can be displayed within a bordered div.
I want the bordered div to stay the same width no matter which word is in
it, short or long.

I imagine I can make the bordered div be an absolute width the size of the
longest word in the list (unfortunately the font I am dealing with isnt
monotype). How can I calculate what the widths of the longest word is?

Anyone have experience doing this?

Thnx,

Ivo


More information about the thelist mailing list