Mia queries: max-width vs min-width when you learn to code responsive emails with mia queries, theres a good chance you were told to use the max-width property, which is essentially a desktop-first mentality. That may have made sense for a lot of senders 10 years ago, but things have chang. So, whats the big difference? Desktop-first = max-width when you use the max-width property, you are essentially telling email clients that your desktop styles are the default, and you use mia queries to adapt for smaller screens. The max-width describes the maximum width before styles stop being appli. So, your styles should be order from largest to smallest. In other words, max-width indicates that: if the screen size is less than or equal to x, then do y.

Near the Top and Again at

Heres how you might code a basic two-column email for desktop using a max-width mia query that would stack the columns for mobile viewing:view this code on parcel. Basically, what were saying is that business email list any code nest in the max-width mia query should only trigger if the screen size or viewport is less than 480 pixels. When the screen for a mobile device, or a browser window on desktop, is under 480px, the columns will stack. The class . Column sets each divs display property to table-cell, which allows the columns to function like a table.

The End Using Different Language for

The mia query says to use these styles when the screen size is above 480px. (note: the parent divs display property nes to be set to table for this to work. ) then you ne to change the display property to block for mobile and set the width property to 100%. You also ne to use ! Important to override the code above the mia query. Mobile-first = min-width when you BOLD Data use the min-width property, you are telling email clients your mobile styles are the default, and you use mia queries to adapt for larger screens. The min-width defines the minimum width before styles start being appli. So, youd list your styles from smallest to largest (aka mobile first).

By 0qm2e

Leave a Reply

Your email address will not be published. Required fields are marked *