Prevent iPhone auto adjusting web font sizes

Posted 28th July 2010 in Blog

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.

Suite 161
24 Station Square
Inverness
IV1 1LD

01463 630020
01463 630027 (Fax)

info@steveabraham.co.uk