Anupama said the following on 11/23/2006 2:22 AM:
How can I change font size according to window size?
You use the onresize event to trigger a function that will change the
font size percentage for the page.
font-size=xx% is not working as I expect.
That is because the % is in relation to a default size for the font, not
in relation to the size of the window.
Plz give me code for that.
Code for what? To annoy your users?
My wish is to chage font size according to window size,
Your wish is mis-directed though.
so that I can always get same type of screen.
So, if I have my window set to 800x800 and have the font the size I want
it, and then I resize the window to 200x200 you want to make the font
size 1/4 the size it was to start with? Try setting font size to 25% and
then try reading it. Not very nice.
Currently when i reduce my window , my text also changes its position,
looks quite messy.
Not near as "messy" as changing font size to 10% or 25% would be.
<URL: http://allmyfaqs.net/faq.pl?AnySizeDesign>
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/