Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to fix paddings in email layout?

I have a problem with email layout paddings on mobile version. I think td tag add their padding without permit, and i can’t fix it. Maybe you have ideas guys?
desktop version:
enter image description here
mobile version:
enter image description here
code of these block:

 <table border="0" cellpadding="0" cellspacing="0" style="margin-bottom: 10px;">
                                    <tr>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0" style="margin:0; padding:0;">
                                                <tr style="margin:0; padding:0;">
                                                    <td class="link-td">
                                                        <a class="link" href="#" style="font-size: 11px;color: #08D2FF;font-weight: 600;text-decoration: none;margin: 0;margin-bottom: 5px;padding: 0;">dawcdawdcawdc</a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0" style="margin:0; padding:0;">
                                                <tr style="margin:0; padding:0;">
                                                    <td class="link-td">
                                                        <a class="link" href="#" style="font-size: 11px;color: #08D2FF;font-weight: 600;text-decoration: none;margin: 0;margin-bottom: 5px;padding: 0;">awdcawdcawd</a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0" style="margin:0; padding:0;">
                                                <tr style="margin:0; padding:0;">
                                                    <td class="link-td">
                                                        <a class="link" href="#" style="font-size: 11px;color: #08D2FF;font-weight: 600;text-decoration: none;margin: 0;margin-bottom: 5px;padding: 0;">acdawcdawdcaw</a>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0" style="margin:0; padding:0;">
                                                <tr style="margin:0; padding:0;">
                                                    <td>
                                                        <p style="font-size: 11px;color: #08D2FF;font-weight: 600;text-decoration: none;margin: 0;margin-bottom: 5px;padding: 0;">acdawdcawdcw</p>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>

I have tried give td tag, link class padding: 0; margin:0; line-height: 100%, and that don’t work

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Step three of this article suggests that you should be setting padding:0; on your <td> elements, whereas you are only setting this on <tr> and <a>.

And do you really need nested tables? Simplifying your code to use a single table may be helpful as well.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading