Skip to content Skip to sidebar Skip to footer

Issue Stopping Iphone Resizing Html E-mails

I'm having an issue trying to prevent the iPhone from resizing HTML e-mails to fit the screen. It seems that code below when put into the section has no effect. My goal is just to

Solution 1:

The iPhone seems to be a pain when it comes to resizing things, especially when you switch the orientation of the phone. Have you tried adding the meta tag with viewport settings in it?

<metaname="viewport"content="width=device-width, maximum-scale=1, minimum-scale=1, user-scalable=no"/>

It does prevent them from zooming, but I haven't found any better way to stop the iPhone from zooming on orientation change. I'm not sure if this will help in this situation, but just a suggestion to try out.

Solution 2:

I been stuck w/ this problem and there's no available solution on the net that works. Not until I realized what's causing this.

CAUSE: This problem occurs if you have an image w/in the email. When the image auto-scale, the entire email/page will auto-fit in the window.

SOLUTION: Add inline style for the image for min-width (300px so it doesn't take the entire 320px iphone width), max-width (your desired max with), and width of 100%.

i.e. image src="image.jpg" style="width: 100%; min-width: 300px; max-width: 500px;"

Worked for me, ...hoping this can help you too! ;-)

Solution 3:

What you are doing is correct but the problem is that rather than using -webkit-text-size-adjust:none; inside a style tag, you should use it in the below manner:

<bodystyle="-webkit-text-size-adjust:none;">

This means you should use this as an inline css property.

Solution 4:

To get rid of that problem you have to put the following in your CSS body tag:

    -webkit-text-size-adjust: 100%;

This way Safari keeps the text to 100% of intended size. In case you set the value to none, the users won't be able to increase the font and this is an undesired behavior.

This CSS property is supported and should work.

Check the official Safari supported CSS reference:

https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html

Furthermore please note that the media type screen is supported in:

  • Safari 4.0 and later.
  • iOS 1.0 and later.

I hope this helps.

BR, Tolis

Solution 5:

A retina iPhone has a 640px width, your media query stops at 480px.

Anyway, you can get rid of the media query altogether. The only webkit based mail client that will use this property (-webkit-text-size-adjust:none) is iPhone's and iPad's Mail app.

Also the Mail app may also be the only client supporting CSS3

Post a Comment for "Issue Stopping Iphone Resizing Html E-mails"