Skip to content

Instantly share code, notes, and snippets.

@htmlr
Last active March 28, 2016 07:04
Show Gist options
  • Select an option

  • Save htmlr/0234762677117e66902e to your computer and use it in GitHub Desktop.

Select an option

Save htmlr/0234762677117e66902e to your computer and use it in GitHub Desktop.
Stacking and re-ordering in responsive emails
.feature-table {
width:600px;
}
.feature-desc {
}
.feature-image {
}
@media only screen and (max-width:500px){
.feature-table, tr, td {
display:block;
width:100%;
}
td[class=feature-image] {
display:table-header-group;
}
td[class=feature-desc] {
display:table-footer-group;
}
}
<table class="feature-table">
<tr>
<td class="feature-desc">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam semper enim et congue condimentum. Suspendisse vel dictum ante, cursus sodales mauris. </td>
<td class="feature-image"><img src="http://placehold.it/150x150"></td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment