CSS Media Queries for targeting Apple iPad

If you are creating a responsive HTMl email, you can use the following CSS media queries to target Apple iPad in both portrait and landscape view.

Simply include the following CSS within the <head></head> of your emails HTML:

HTML


  <style>

    /* iPads (portrait) Styling */
    @media handheld, all and  (device-width: 768px) and (device-height: 1024px) and (orientation : portrait) {
      /* Add your styling here */
    }

    /* iPads (landscape) Styling */
    @media handheld, all and (device-width: 768px) and (device-height: 1024px) and (orientation : landscape) {
      /* Add your styling here */
    }

  </style>

Leave a Reply

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