George Hester wrote:
> <div id="fltUp" align="center"><font
> size="3+" id="fntStop">Howdy</font></div>
>
> Now in JavaScript I can read fltUp.innerText.length. But if the
> size of the font changes fltUp.innerText.length does not. How can
> I compensate the width of Howdy when the font size changes?
"The font size chosen by the user as a comfortable default (1 em)
provides more truly useful information about the rendering environment
than all the resolution-sniffing, window-querying, 'open-this-wide'
logic you can throw at the problem."
- Todd Fahrner
In other words, use css and the em unit to size what you need to size.
No js needed.
--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
|