Jump to content

IE font size compatible


zeidhaddadin

Recommended Posts

The easiest way is just to switch the stylesheet, like CNN does.<div id="cnnSCFontMinusBtn" onclick="setActiveStyleSheet('default'); return false;"><div id="cnnSCFontPlusBtn" onclick="setActiveStyleSheet('LargeFont'); return false;">They have a Javascript function that changes the stylesheet to whichever one they want to use.

Link to comment
Share on other sites

thanks but is there a harder way?!
Uhhh.. yeah, I guess you could loop through every element in the DOM and check the style.fontSize property of every single element and change it by a certain percent if it's defined and non-zero. That would be harder. Or you could try to access each class in the CSS sheet and dynamically change the font size property. I don't know how you would do that, so that must be really hard! Or maybe you could write an ActiveX object to do the same thing, that would be both hard and completely pointless. You could also try typing the code with only one hand, that would be sort of hard. Or program on a laptop while you're trying to keep your balance on top of a bus that is speeding down an icy street. I would imagine that would be fairly difficult. You could also write a program using only assembly to access the CSS information that is being stored in RAM on the client's machine, and then develop a browser plugin so that the browsers could run your assembly code.Whatever fits your style.
Link to comment
Share on other sites

I want to do it naturaly from my css or html .. like mojeek.com or twingine.com they don't have scripts on their main page!
Well you also can't change the font size on those pages. It's just a search box. I'm not sure what you're asking, but anywhere you see this happening, you can look at the code and figure out how they're doing it, just look for whatever you click on to change the font size and see what it does.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...