email - Responsive e-mail: turn table cells (td) to (cleared) blocks -


i have basic example should display these 3 table cells blocks (underneath each other) on mobile devices.

yet doesn't seem work out on ipad, iphone, nor on samsung phone. does work on regular browsers , websites simulate mobile display (for web pages probably), when viewing on actual mail clients of mobile devices, display: block property seems ignored.

is there that's missing? or if display-attribute isn't supported @ all, alternative?

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html> <head>     <meta charset="utf-8">     <title>mobilize me</title>     <style type="text/css">         @media screen , (max-width: 1400px) {             table,tr,td{                 width: 100% !important;                 display: block !important;                 clear: both !important;             }         }     </style> </head> <body>     <table cellspacing="0" cellpadding="0" width="900">         <tr>             <td width="33%" bgcolor="red">                1             </td>             <td width="33%" bgcolor="green">                 2             </td>             <td width="33%" bgcolor="blue">                 3             </td>         </tr>     </table> </body> </html> 

remarkably example this thread isn't working either.

use 3 nested tables "align=" replicate "float" , have media query resize table 100% display:block on mobile.

i added classes differentiate between container , block tables. added couple inline styles help.

e.g.

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html> <head>     <meta charset="utf-8">     <title>mobilize me</title>     <style type="text/css">         @media screen , (max-width: 900px) {             .container {                 width: 100% !important;                 text-align:center !important;             }             .blocktable {                 width: 100% !important;                 display: block !important;                 margin: 0 auto !important;             }         }     </style> </head> <body>     <table cellspacing="0" cellpadding="0" border="0" width="900" class="container" style="border-collapse:collapse;">         <tr>         <td align="center">             <table align="left" bgcolor="red" cellspacing="0" cellpadding="0" border="0" width="33%" class="blocktable" style="border-collapse:collapse;">             <tr>             <td>one</td>             </tr>             </table>              <table align="left" bgcolor="green" cellspacing="0" cellpadding="0" border="0" width="34%" class="blocktable" style="border-collapse:collapse;">              <tr>             <td>two</td>             </tr>             </table>             <table align="right" bgcolor="blue" cellspacing="0" cellpadding="0" border="0" width="33%" class="blocktable" style="border-collapse:collapse;">             <tr>             <td>three</td>             </tr>             </table>         </td>         </tr>     </table> </body> </html> 

Comments

Popular posts from this blog

tcpdump - How to check if server received packet (acknowledged) -