Simple Implementation of FontSizer

This example demonstrates the simplest setup of the FontSize Change JavaScript for resize of text throughout your documents. Try the text size links on the right to see the effect.

To set this up just include script tags pointing to the external JavaScript files, a div containing the size change links and a call to an initialization function. See the documentation for specifics.

Depending upon how you have specified font sizes in your documents this may be all you will need to do to implement the text resize code. A basic document demonstrating this setup is included in the download file.

More About This Example

The font size change code works in conjunction with your style sheets. It works differently depending upon how you specify font size in your documents.

This simple setup will work to increase the size of text throughout your documents if you have specified most of the font sizes using relative units of measurement or if you are using tables for layout. For example, the document you are viewing specifies most font sizes using percentages or em's but specifies the overall font size on the body using pixels.

If you have specified font sizes on various elements in your documents using absolute units of measurement such as pixels or points there is another easy means of setting up the code to resize all the text in your document.

More About the Code and Other Examples

The FontSize Change JavaScript is very flexible. The code can be used to control the size of text in your documents no matter where or how you have specified font size or other styles. You can use it to precisely control what can be resized and how much or apply the resize to text throughout your pages.

Other examples, listed in the right column, demonstrate and describe the code's range of usage. Basic example documents in the download file will assist you in implementing the code to suit your purposes. The documentation provides specific instructions and more information about the code.

See Licensing Information for use of the code. Please read dyn-web's Terms of Use if you plan to use our code.

Back to top