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

Ivo P ipletikosic at gmail.com
Mon Oct 17 17:00:01 CDT 2005

Thanks for the advice Christian & Peter-Paul.

I am exploring using a font table where I am keeping the pixel widths of the
letter 'm' (usually the widest letter) of generic font families. For this to
work I took away the ability to resize the font on the page using the
browser menu & instead provide a dropdown with specific text sizes. Knowing
the exact font size, the screen resolution and the width of the longest
letter I can calculate a div wide enough to fit the longest word with some

not pretty but lets see where it takes me.



More information about the thelist mailing list