Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question javascript to change fontsize in tables

    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

  • #2
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    document.write doesn't work satisfactory either. I have another question. Is it possible to switch between stylesheets using javascript or anything else?

  • #3
    Regular Coder
    Join Date
    Mar 2003
    Posts
    176
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can use DOM 2 CSS to rewrite stylesheet values on the fly. I asked something similar quite recently - changing element styles in real time
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    For a stylesheet switcher using all stylesheets instead of only link tags - ThemeSwitcher.

    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.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #6
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've got all that i needed, thanks to you all.

    Patrick


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •