Prevent iPhone auto adjusting web font sizes

Posted on 28th July 2010 in Apple, iPhone, Web Development with 0 comments.

When viewing websites on the iPhone it will auto adjust font sizes at will to improve readability - this can be especially useful when switching from landscape to portrait, for example.

However, on certain web layouts this can cause problems and may result in an undesired layout.

To prevent this, simply add the following to any element in your CSS:

-webkit-text-size-adjust:none;

Safari will now no longer auto adjust the font size.






Are you human?

Remember my personal information
Notify me of follow-up comments