We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21112
    • 156 Posts
    Hi everyone.

    I’m building a site for a client who wants to have A+ and A- buttons for live scaling of the font size on the site, with the size preference preserved between pages and perhaps sessions.

    I first tried swapping style sheets, but since I’m only changing one value (the base font size - all others are relative to this), I thought this was incredibly inefficient. Not to mention it made a lot more work for me when I wanted to make a small change to the style sheet, I had to update them all.

    I found a great simple DHTML script that works well (Document Text Sizer: http://www.dynamicdrive.com/dynamicindex9/textsizer.htm ) but the code doesn’t include a cookie to preserve the setting between pages, so clicking on a link resets the size.

    I am by no means a programmer, and HTML+CSS is my limit, although I am able to modify the most basic levels of code for my purposes.

    Can anyone suggest to me a simple "plug in" cookie script that can save the font size setting, or perhaps point to a different script which can handle both aspects? I’ve done quite a lot of searching myself already and tried a few, but my knowledge was insufficient to be able to successfully adapt them to my needs, so the simpler the better. Also I need the script to be free and without any terms that require a link or credit outside the source of the code.

    Thanks in advance so much for the help!
      • 10487 MODX Staff
      • 1,535 Posts
      I’m pretty sure I’ve got one stored somewhere that works with cookies - might even be a modded version of the dynamicdrive one you posted above.

      I’ll try and dig it out and post it here when I get to work in a few hours.
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 21112
        • 156 Posts
        Thank you very much! Any help you can offer would be very welcome!
          • 13137
          • 204 Posts
          Did anyone ever find a solution to this?

          I too would like to have text scaling on a site.

          Thanks for any reply.
            • 10226
            • 412 Posts
            Yeah this is a great thing to have... The old and disabled do surf the web. Making your site more accessible is always a +

            did we ever figure this out?

            Thanks!