|
![]() Adapt a newsletter for different display width (with the @media rule)![]() ![]() Not only can the width of the newsletter be adjusted to fit well in the display. Also the font size, margins and picture width and height, and other parts of a newsletter, can be adjusted automatically by using the media query rule. The example below shows how the @media rule can be used:
In the example above the size information and font sizes will only be used if the display is 480 pixels wide or less. If the display is wider the information above will not be used; instead are the standard settings used. In this way you can create newsletters that look great in both computer monitors and mobile phone / smartphone displays. Many older mobile phones and smartphones do not support the @media rule, but then is the script above ignored and the ordinary settings are used instead. So it is risk free to use @media in this way. The @media rule is only used if it is recognized by the browser or e-mail client, and if the conditions are right.
Read more about the @media rule More information about the @media rule is available on these pages: ![]() ![]() << Go Back (to the article: 'How to Create a Newsletter for a Mobile Phone & Smartphone') |