I'm working on an HTML email and have been running to a problem on the mail client on the iPad only.
It seems that setting inline CSS to "font-size: 12px" or any other size does not work on the mail app for iPad, despite the font-size displaying correctly in the Mail app for Mac OS X.
Any ideas?
Larger Text: Turn on Larger Accessibility Sizes, then adjust the text size using the Font Size slider. This setting adjusts to your preferred text size in apps that support Dynamic Type, such as Settings, Calendar, Contacts, Mail, Messages, and Notes.
Go to your browser's settings and make sure in the font settings that your minimum font setting is set to 10px… if not then change it, save & go back to the code. It should pass you then!
To change the font size in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property font-size. HTML5 do not support the <font> tag, so the CSS style is used to add font size.
In HTML, you can change the size of text with the <font> tag using the size attribute. The size attribute specifies how large a font will be displayed in either relative or absolute terms. Close the <font> tag with </font> to return to a normal text size.
Webkit automatically adjusts font-sizes on the ipad for easy reading. This CSS fixes the problem:
-webkit-text-size-adjust: none;
The WebKit layout engine automatically adjusts font-sizes.
As of this post, Webkit is commonly used in Safari, Chrome, Kindle and Palm Browsers.
Applications can also take advantage of WebKit.
The problem comes down to minimum 'font-size: 13px;'
A CSS work-around:
<style type="text/css">
div, p, a, li, td { -webkit-text-size-adjust:none; }</style>
One issue is when creating e-Mail Signatures, for tags may be over-written or stripped.
Please Note that inline WebKit Styling will be stripped out of Gmail's Web Client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With