I have a coded email template with a alternating small/large (image/text) column table cell layout.
{% if widget_data.section_1.value == 'True' %}
<!-- Begin ROW 1 Wrapper -->
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="contentTableOuter" style="{{email_body_border_css}}; background-color:#f9f9f9">
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" id="contentTableInner">
<div class="body-container-wrapper">
<tr>
<td align="center" valign="top" class="bodyContent" width="100%" colspan="12">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="templateColumnWrapper">
<tr>
<td valign="top" colspan="5" width="41.66666666666667%" class=" column" style="width:41.66666666666667%; text-align: left; padding: 0; font-family: {{ primary_font }}; font-size: {{ primary_font_size }}; line-height: 1.5em; color: {{ primary_font_color }}; ">
<div class="widget-span widget-type-linked_image " style="text-align:center" data-widget-type="linked_image">
<div class="layout-widget-wrapper">
{% linked_image "feature_image_1" overrideable=true, ending_html='', starting_html='', src='//static.hubspot.com/final/img/content/email-template-images/placeholder_200x200.png', label='Feature Image 1'%}
</div>
<!--end layout-widget-wrapper -->
</div>
<!--end widget-span -->
</td>
<td valign="middle" colspan="7" width="58.333333333333336%" class=" column" style="width:58.333333333333336%; text-align: left; padding: 0; font-family: {{ primary_font }}; font-size: {{ primary_font_size }}; line-height: 1.5em; color: {{ primary_font_color }}; ">
<div class="widget-span widget-type-rich_text " data-widget-type="rich_text">
<div class="layout-widget-wrapper">
{% widget_block rich_text "feature_text_1" overrideable=True, label="Feature Text 1" %}
{% widget_attribute "html" %}
<h2>Something Powerful</h2>
<p>The headline and subheader tells us what you're
<a href="#">offering</a>, and the form header closes the deal. Over here you can explain why your offer is so great it's worth filling out a form for.
</p>
{% end_widget_attribute %}
{% end_widget_block %}
</div>
<!--end layout-widget-wrapper -->
</div>
<!--end widget-span -->
</td>
</tr>
</table>
</td>
</tr>
</div>
<!--end body wrapper -->
</table>
</td>
</tr>
</table>
<!-- End ROW 1 Wrapper -->
{% endif %}
{% if widget_data.section_2.value == 'True' %}
<!-- Begin ROW 2 Wrapper -->
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="contentTableOuter" style="{{email_body_border_css}}">
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" id="contentTableInner">
<div class="body-container-wrapper">
<tr>
<td align="center" valign="top" class="bodyContent" width="100%" colspan="12">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="templateColumnWrapper">
<tr>
<td valign="middle" colspan="7" width="58.333333333333336%" class=" column" style="width:58.333333333333336%; text-align: left; padding: 0; font-family: {{ primary_font }}; font-size: {{ primary_font_size }}; line-height: 1.5em; color: {{ primary_font_color }}; ">
<div class="widget-span widget-type-rich_text " data-widget-type="rich_text">
<div class="layout-widget-wrapper">
{% widget_block rich_text "feature_row_2" overrideable=True, label="Feature Text 2" %}
{% widget_attribute "html" %}
<h2>Something Powerful</h2>
<p>The headline and subheader tells us what you're
<a href="#">offering</a>, and the form header closes the deal. Over here you can explain why your offer is so great it's worth filling out a form for.
</p>
{% end_widget_attribute %}
{% end_widget_block %}
</div>
<!--end layout-widget-wrapper -->
</div>
<!--end widget-span -->
</td>
<td valign="top" colspan="5" width="41.66666666666667%" class=" column" style="width:41.66666666666667%; text-align: left; padding: 0; font-family: {{ primary_font }}; font-size: {{ primary_font_size }}; line-height: 1.5em; color: {{ primary_font_color }}; ">
<div class="widget-span widget-type-linked_image " style="text-align:center" data-widget-type="linked_image">
<div class="layout-widget-wrapper">
{% linked_image "feature_image_2" overrideable=true, ending_html='', starting_html='', src='//static.hubspot.com/final/img/content/email-template-images/placeholder_200x200.png', label='Feature Image 2'%}
</div>
<!--end layout-widget-wrapper -->
</div>
<!--end widget-span -->
</td>
</tr>
</table>
</td>
</tr>
</div>
<!--end body wrapper -->
</table>
</td>
</tr>
</table>
<!-- End ROW 2 Wrapper -->
{% endif %}
It looks great on desktop email clients, however on mobile the layout breaks.
Is there a way I can set the default layout for all rows so the image is on the left and the text is on the right, but if I set a boolean switch the layout of the image and text elements changes for alternate rows on desktop views.
I can’t think of an elegant solution that doesn’t cause issues with live emails using the template or give content creators issue when building out a email from the template
Thanks


