Fonts being resized on iPhone/Safari

Just a quick update. I’ve noticed on the iPhone version of this site, and others, that the main fonts are a lot larger than they should be. After a bit of investigation it turns out the issue is to do with WebKit (the platform Safari is built upon, amongst other browsers) automatically resizing the font to make it more readable on the small iPhone screen.

To prevent this happening the following CSS can be used:

body {
    -webkit-text-size-adjust: none;
}

It’s also possible to use a percentage or ‘auto’ to control the scale. Now I understand the reason behind this I’m going to leave it as is, but if you have text being resized that you really don’t want then this should solve your problems. Note that using this will also prevent the user from controlling their font size on other Web-Kit browsers such as Chrome, which may be quite undesirable (and half my reason for not using it).

Posted in Web | Tagged , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

> Talk to me!

Twitter profile for Richard Turnbullwitter:
  • Attempting to load Twitter feed..
Facebook profile for Richard Turnbull LinkedIn profile for Richard Turnbull

> Tools

Share |

> Advert