SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    New Zealand
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scalable Font Sizing - Still Necessary?

    Just curious - With modern browsers zooming the whole page, rather than simply increasing the font size as in the past, is it still as important to use em/%/etc rather than px for setting font size?

  2. #2
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Since zoom isn't the only option (there's also the much-more-awesome text-enlarge, which makes text readable for me without distorting images or causing sideways scrolling like zoom does), you'll have to take into account that IE (even IE8 and 9) do not increase text size if you set them in pixels.


    But beyond that, I dunno. Since I hate zoom and love text-enlarge, it might be just me. And I used to think Safari didn't have zoom but apparently they've added it now.

    I also like the idea that a user agent such as one on a mobile can increase text without using zoom (since zooming on a web site is sucky usability).

  3. #3
    Non-Member Kalon's Avatar
    Join Date
    Aug 2010
    Location
    At my computer
    Posts
    2,012
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by KiwiJohn View Post
    Just curious - With modern browsers zooming the whole page, rather than simply increasing the font size as in the past, is it still as important to use em/%/etc rather than px for setting font size?
    I think some browsers won't zoom text whose size is in pixels.

    I prefer to use em's - but that is just me.

    With browsers having a zoom feature, I don't bother with text enlarging scripts anymore. The zoom feature works quite well imho.

  4. #4
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    It is still important to avoid using px to size text, because there are still plenty of people using browsers that don't have page zoom, and there are also plenty of people who prefer to change the size of the text rather than zoom the whole page (which invariably makes a mess of images and often doesn't do great things for the layout).

    There's no reason to set the size in pixels rather than %/em, and good reasons not to.

  5. #5
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Kalon View Post
    I think some browsers won't zoom text whose size is in pixels.
    I've not come across that one. Page zoom should enlarge everything on the page, including images (although it doesn't tend to work for other embedded objects) and layout, so certainly should include fonts sized in pixels. IE8 definitely does zoom pixel-sized text. Of course, you've still got to cater for browsers from before the days of page zoom.

    With browsers having a zoom feature, I don't bother with text enlarging scripts anymore.
    I've never seen the point of replicating any browser functionality with fragile and restrictive widgets in the web page - not for printing, not for going back a page, and certainly not for changing the size of the text. Show people how to use their browser properly, rather than giving them props that stop them from learning.


Bookmarks

Posting Permissions

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