html email - @media queries being ignored for iphone -


for reason, media query not applying when send email. i'm sending outlook 2007 gmail , viewing using iphone 4s. i've tried sending test emails simpler @media query rules (i.e. media query changes font color) don't work either. also, i've tried sending demo html emails tutorials (such one: http://www.netmagazine.com/tutorials/build-responsive-emails) media queries being ignored there

i've attached beginning of code below:

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org    /tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>sample</title> <style type="text/css">     @media screen , (max-width: 480px) {          table[class="contenttable"] {              width:400px !important;             text-align: left !important;         }          table[class="contenttable2"] {              width: 382px !important;             text-align: left !important;         }          td[class="changer"] {              width:382px !important;             height: 10px !important;         }          td[class="autoalign"] {             padding: 0 !important;             text-align: center !important;         }          img[class="logo"]  {             margin-left: -10px !important;         }          td[class="autotext"] {             font-size: 14px !important;             text-align:left !important;             height: 70px !important;         }          td[class="textresize"] {             font-size: 8px !important;         }          img[class="imghide"] {             display:none !important;             height:0 !important;             width:0 !important;              }     } </style> </head> <body style="padding:0; margin:0; webkit-text-size-adjust:none;-ms-text-size-adjust: 100%;">  <table width="600" border="0" cellpadding="0" cellspacing="0" class="contenttable" align="center" style="font-family: arial;"> 

i'm @ complete loss problem is. appreciated.

unfortunately, gmail not support media queries (see http://www.emailonacid.com/blog/details/c13/media_queries_in_html_emails), although many do. best bet design first without media queries, , use regular css columns stack etc, accepting fact design won't perfect everywhere, still accessible. can add media query magic make fantastic on every client supports it. see http://www.zurb.com/article/1119/create-emails-for-any-device-introducing- example of such approach, , http://www.zurb.com/playground/responsive-email-templates basic templates , running.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -