...

View Full Version : javascript to change fontsize in tables



patrick
03-31-2003, 01:03 PM
I'm building a site for diffirent screen resolutions. But i can't find out how to change the fontsize in tables. The code in the tables has already been written and can't be changed. I use this code in the stylesheet for tables.

Table { font-family : Arial;
font-size : 12pt;
}

It must be possible to use javascript to change that into a diffirent size, right?
I use document.write for fonts outside tables. If you know a better way to do this, it would be welcome too.

Thanks,

Patrick

patrick
04-01-2003, 07:40 AM
document.write doesn't work satisfactory either. I have another question. Is it possible to switch between stylesheets using javascript or anything else?

HairyTeeth
04-01-2003, 08:26 AM
for the stylesheet switcher:

http://www.alistapart.com/stories/alternate/index.html

brothercake
04-01-2003, 10:22 AM
You can use DOM 2 CSS to rewrite stylesheet values on the fly. I asked something similar quite recently - http://codingforums.com/showthread.php?s=&threadid=14259

liorean
04-01-2003, 11:21 AM
For a stylesheet switcher using all stylesheets instead of only link tags - ThemeSwitcher (http://liorean.web-graphics.com/scripts/themeswitch.html).

As for the stylesheets collection, just a small support notice:
DOM CSS is only supported in saf/konq, iem (support for both, but not as complete as moz, saf or iew) and moz as of now. iew got it's own stylesheets collection properties.

Most notably, Op7 hasn't got the styleSheets collection.

patrick
04-02-2003, 03:11 PM
I've got all that i needed, thanks to you all.

Patrick



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum