www.webdeveloper.com
Results 1 to 4 of 4

Thread: How to Dynamically resize font size when browser size changes.

  1. #1
    Join Date
    Oct 2010
    Posts
    12

    How to Dynamically resize font size when browser size changes.

    How can I change my text or font size when the user changes the browser size.

    Example: When the browser is maximized, the font goes to normal, when the browser window decreased, the font size is reduce.


    Thanks everyone!

  2. #2
    Join Date
    Aug 2006
    Posts
    1,897
    I don't know offhand, but this sounds like a really, really bad idea. People don't expect the text size to change as they change the browser window. They make windows bigger so they can see more of your page, and smaller if they need more room on their monitor for other things.

    Dave

  3. #3
    Join Date
    Oct 2010
    Posts
    12
    Quote Originally Posted by tracknut View Post
    I don't know offhand, but this sounds like a really, really bad idea. People don't expect the text size to change as they change the browser window. They make windows bigger so they can see more of your page, and smaller if they need more room on their monitor for other things.

    Dave
    I completely understand, this is not for a real world project.

    Just a practice (knowledge) project!

    If I was making an actual real world project, I'll add buttons to let the user increase or decrease the text size according to their liking.

    Novice

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    fontSize = parseInt(window width / constant) +'px'
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles