back to phpList.org

Formatting for iOS (and everything else)


#1

I’m about to send our first ever email through phpList. Yay for that.

All is good, except for one formatting challenge.

I am sending an html email and it includes a couple of images. I had set the image width, for no real scientific reason, to 940 pixels. Android, Gmail, and Outlook scales the images to fill the viewing windows, and leaves the text correctly at the 12 pt size I have specified in the CKEditor generated text.

But the default mail client in iOS does something funky. It fills the screen width with the image, but then shrinks down the text so it is something like 1/3 or so the screen width, and very tiny.

If I make the images smaller, then the “shrinking” is less, but still there and still a problem. And if I make the images too small, they then look strange in other mail clients.

Is there something I can tweak to allow the email to look good in all mail clients. There is nothing in the source html I can see that should be causing problems - several span statements and font attributes, but nothing else.

Many thanks for any help that is available

David.


#2

@DRoberts Instead of specifying a width in pixels for an image you should use a % width along with max-width, e.g.

width: 100%; max-width: 450px;

I find that then scales the image but leaves the text at the normal size.


#3

Hi

Many thanks for this. Just to be clear, do you mean in the img tag?

So, something like

<img src="whatever" style="width: 100%; max-width: 450px;" />

and no parameter for height?


#4

Yes those apply to the image tag.


#5

Sorry to be slow responding again. Thank you, this addressed the issue perfectly.