Question
Email Template Help - Mobile Image in Head
Hi!
I got an email template from our dev team and am trying to convert it to 2.0. I'm not sure how to handle this particular variable. There's a mobile version of the background image in the head while the desktop background image is in the body. Any ideas on how to go about doing this?
<head>
<style>
@media only screen and (max-width: 599px) {
.story1_mobile_background {background-image:url(/images/story1_mobile.jpg) !important; }
}
</style>
</head>
<body>
<!-- Hero Module Without CTA -->
<table class="container_module" border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="margin:0; vertical-align:top;">
<tbody>
<tr>
<td class="story1_mobile_background" align="center" valign="top" width="100%" background="/images/story1_desktop.jpg" style=" background-image:url(/images/story1_desktop.jpg); background-repeat:no-repeat; background-size:cover; background-position: center center; margin: 0;">
<div style="visibility:hidden; display:none; color:transparent; height: 1px;">
<img src="images/spacer.gif" alt="" height="1">
</div>
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:600px; height:171px;">
<v:fill type="frame" src="/images/story1_desktop.jpg" />
<v:textbox inset="10,10,10,10" v-text-anchor="top">
<![endif]-->
<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0" style="vertical-align:top;">
<tbody>
<tr>
<td class="padding_top_60 padding_right_100 padding_bottom_60 padding_left_23 text_26" width="100%" valign="top" align="left" style="color:#ffffff; vertical-align:top; padding: 30px 290px 30px 40px; margin:0; font-family:Arial, Helvetica, sans-serif; font-size:35px; line-height: 37px; -webkit-text-size-adjust:none;"><span class="text_26" style="margin:0; font-family:Arial, Helvetica, sans-serif;
font-size:35px; line-height: 37px; color:#ffffff;"><b>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</b></span></td>
</tr>
</tbody>
</table>
<!--[if gte mso 9]></v:textbox></v:rect><![endif]--> </td>
</tr>
</tbody>
</table>
<!-- End of Hero Module Without CTA -->
</body>