Enlarge text with a javascript link..how??

Discussion in 'Javascript' started by chris, Sep 30, 2003.

  1. chris

    chris Guest

    Hi,

    I need to add a text or image link which when click on will enlarge
    the text on a web page to ither large or largest.

    How can I do this, if its possible.

    Chris
     
    chris, Sep 30, 2003
    #1
    1. Advertisements

  2. (chris) writes:

    > I need to add a text or image link which when click on will enlarge
    > the text on a web page to ither large or largest.


    <input type="button" onclick="document.body.style.fontSize = '120%'"
    value="Larger">
    <input type="button" onclick="document.body.style.fontSize = '144%'"
    value="Largest">

    Remeber to only use relative sizing on the font sizes you set
    yourself, then a larger font size for the body element will be
    inherited for the entire page.

    /L
    --
    Lasse Reichstein Nielsen -
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Oct 1, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shamli
    Replies:
    4
    Views:
    1,211
    Rafal 'Raf256' Maj
    Oct 11, 2003
  2. Qoo

    Enlarge the stack size in gcc ?

    Qoo, Jun 21, 2005, in forum: C Programming
    Replies:
    3
    Views:
    863
    Anonymous 7843
    Jun 21, 2005
  3. K.

    a href area to enlarge

    K., Jun 22, 2007, in forum: HTML
    Replies:
    11
    Views:
    1,488
    dorayme
    Jun 24, 2007
  4. robos85

    PIL how to enlarge image

    robos85, Dec 4, 2010, in forum: Python
    Replies:
    1
    Views:
    485
    Alain Ketterlin
    Dec 4, 2010
  5. Stefan Salewski
    Replies:
    2
    Views:
    205
    Stefan Salewski
    Apr 12, 2011
  6. Eraserhead

    Click to enlarge issues

    Eraserhead, Jul 23, 2003, in forum: Javascript
    Replies:
    2
    Views:
    196
    Hywel Jenkins
    Jul 24, 2003
  7. Blue®
    Replies:
    4
    Views:
    1,213
    Blue®
    Sep 27, 2003
  8. Ugur Boss

    enlarge Variablenames

    Ugur Boss, Jun 15, 2004, in forum: Perl Misc
    Replies:
    8
    Views:
    237
    Joe Smith
    Jun 16, 2004
Loading...