Sunday, March 05, 2017

[rifctyln] Table of images

<table cellspacing="0" cellpadding="0"> <tr> <td> <img style="display:block" ... /> </td> ... </tr> ... </table>

Note that making img a block element means it'll add a newline like a paragraph, so no more than one image (horizontally) per TD.

Previously demonstrated here.

https://www.emailonacid.com/blog/article/email-development/12_fixes_for_the_image_spacing_in_html_emails

Interestingly, before CSS, HTML tables were the way to do precise layout; nowadays due to newer default DOCTYPE's, CSS is ironically required to do it this old-school way.

cellspacing and cellpadding go away in HTML5, so CSS "border-spacing" needs to be applied to the table and "padding" to each(!) TD.

No comments :