Drive webinar signups with a personal appeal

Taking advantage of precedence

Remember, CSS rules that appear later in the embedded styles override earlier rules if both have the same specificity. This means that you can set rules for tablets by putting the Breakpoint 4 media query first, then set styles for mobile devices with a Breakpoint 2 media query.

Because the Breakpoint 2 styles come after Breakpoint 4, your mobile styles will override your tablet styles when the Breakpoint 2 query is triggered. This means that you don’t have to set min-width for any of your media queries, as long as they are arranged in the correct order.

Here is an example order:

  • Desktop styles (not in a media query)
  • Tablet styles (max-width: 768px)
  • Mobile styles (max-width: 414px)

It is common to produce an email with just one media Turkmenistan Business Email List query and breakpoint, choosing a breakpoint that suits your content, such as an email with two columns side by side with a width of 300 pixels.

The breakpoint would be 600 pixels—the lowest width before the content in the columns would start to get squashed. At 600 pixels the columns could stack on top of one another and expand to the device width.

Coding with Media Queries

Using media queries in your emails can really help with targeting and making your emails responsive. However you normally add your CSS styles, you can insert your UAE Cell Number  media queries. In the example below, with embedded CSS in the <head> of the html, you can include the media query between <style></style> tags.

STEP 1

Add a class and the CSS you would like between style tags. In this case, the class is .100pc, which is similar to those widely used on mobile to make tables and elements stretch to the full width of the device or containing table.

Leave a comment

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