Fix font size issue on Mobile Safari (iPhone) where text is rendered inconsistently and some fonts are larger than others?

Our site renders with inconsistent font sizes on mobile Safari — and as far as we can tell, only Mobile Safari. This very much has stumped us.

We analyzed the site with Firebug, and the incorrect areas are inheriting the right styles, yet the fonts are still rendered with the wrong sizes.

1) Visit http://www.panabee.com.

2) Conduct a search for a domain name.

The boxes on the left side show the incorrect font sizes. The font size should match the font size on the right side (both box titles and box copy). For instance, the titles, “Variations” and “Twitter,” are much larger than the title, “Alternate Endings.”

Any clue why?

Some font-size’s rendered larger on Safari (iPhone)

Are there CSS or other reasons why Safari/iPhone would ignore some font-size settings? On my particular website Safari on the iPhone renders some font-size:13px text larger than font-size:15px text. D

@font-face not embedding on mobile Safari (iPhone/iPad)

I’m embedding fonts on a mobile website using @font-face (css from FontSquirrel). When I preview in desktop Safari or Chrome, the fonts embed fine, but they don’t appear in mobile Safari on the iPhone

Why am I getting weird font rendering with Dosis on Safari mobile?

I have a webapp that uses Dosis as its main font (http://www.google.com/fonts/specimen/Dosis), and it looks great every browser but Safari mobile, where my font is rendered like this: http://imgur.com

HTML page larger font size on iPad Safari

I would like to know why I am getting a larger font size on Safari on iPad compared to any browser on Mac, even Safari. And how to solve it! This is a WordPress forum and the screenshots attached show

Fonts so big in mobile and other tags [closed]

my fonts in mobile is so bigger than desktop! (iphone 5c). I’m test EM font size and nothing… and others pages H2, h4… some diferents sizes in mobile but my css is same… I used reset.css and i n

Bootstrap 3 @font-size-base larger on mobile

I’m using Bootstrap 3 and less. I like to have a @font-size-base that is larger on mobile devices. But since so many type values are derived from font-size-base, I would like to set this variable cond

render specific font bigger than other fonts

I’m searching for a method to tell the browser to render each glyph rendered with a specific font, e.g. FreeMono, in a bigger font size than glyphs rendered with other fonts. The reason for that is, t

Is there a list of supported fonts for Safari Mobile (ie. iPad and iPhone)?

I’m looking for an exhaustive list of the supported fonts in Safari Mobile for iPad and iPhone. In fact, which fonts can I use in my website?

Wrong font size when using float right in CSS on Mobile Safari

I’m having trouble with a simple CSS-Layout. It works on desktop browsers but not on iPhone’s Mobile Safari. Using style=float:right seems to conflict with automatic font size adjustments made by Mo

Selecting text in mobile Safari on iPhone

I’m trying to make it easy for an iphone user to copy some text to the clipboard in mobile safari. As in the usual touch-hold-copy. There is a specific bit of text I want to a user to copy. I have f

Answers

-webkit-text-size-adjust:none;

will probably solve your problem.

target-element { -webkit-text-size-adjust:80% } 

will still zoom but keeps it 80% smaller than webkits default.

Mobile Safari (like Chrome for Android, Mobile Firefox and IE Mobile) increases the font size of wide blocks (at all times), such that if you double-tap to zoom in on that block (which fits the block to the screen width), the text will be legible. If you set -webkit-text-size-adjust: 100% (or none), it won’t be able to do this, and so when a user double-taps to zoom in on wide blocks the text will be illegibly small; users will be able to read it if they pinch-zoom in, but then the text will be wider than the screen and they’ll have to pan horizontally to read each line of text!

  1. Ideally you would fix this by using Responsive Web Design techniques to make your design adapt to mobile screen sizes (in which case you would no longer have any very wide blocks, so mobile browsers would no longer adjust your font sizes).

  2. If that’s not an option, and you’re stuck serving a desktop site to mobile users, then see if you can tweak your design so none of your blocks of text are wider than the mobile device’s device-width (e.g. 320px for many portrait phones) (you can use mobile-specific css to avoid affecting desktop browsers), then Mobile Safari won’t need to increase any font sizes (and browsers which reflow text, like the Android Browser and Opera Mobile, also won’t need to change your layout).

  3. Finally if you really need to prevent Mobile Safari from adjusting your font sizes you can set -webkit-text-size-adjust: 100%, but do this only as a last resort since it is likely to cause mobile users to have difficulty reading your text, as it’ll either be too small or they’ll have to pan from side to side after every line they read. Note that you must use 100% not none because none has nasty side-effects in desktop browsers. There are also equivalent -moz-text-size-adjust and -ms-text-size-adjust properties for Mobile Firefox and IE Mobile.

Edit: for example in your case the simplest is probably the 2nd alternative, so you could try adding the following CSS:

/* Mobile browsers only */
@media only screen and (max-device-width: 480px) {
    table#all_results {
        width: auto;
    }
    td#main_box {
        width: 320px;
    }
    td#side_box {
        width: 320px;
    }
}

Though it’s not ideal to hardcode 320px like this; you could improve on that by using a variety of CSS media queries, or getting the device-width from JavaScript.

Here’s what ultimately worked (tested only on iPhone 4 tho):

/* Mobile browsers only */
@media only screen and (max-device-width: 480px) {      
        td#main_box { -webkit-text-size-adjust:100% }               
}

We awarded the answer to John since his solution was the basis of this one.

Probably not the most elegant answer, but it works.

-webkit-text-size-adjust: none; will cause you to not be able to zoom in mobile devices. You should use 100% instead.