This code will add 20 pixels How to fix of space below your image tag. It’s important to remember that and instead you’ll want to add the padding to the cell your image is in, like so:
A big advantage of using this method is that it allows you to very quickly adjust your spacing, as long as you’re being cognizant of Outlook’s rendering quirks when it comes to HTML image padding you’ll have no issues implementing this in your emails.
Using margin to control spacing
An alternative of HTML image padding would be to use margin. As we learned earlier, they largely achieve the same end Switzerland Business Fax List result when it comes to spacing.
If you want to use margin rather than padding you can use it as seen below:
There are a notably that Outlook (surprise surprise!) has some funky interactions between margins and background colors.
It’s also very common in web development to
utilize margins with negative values to control positioning of elements and create some clever layouts. Unfortunately that isn’t well supported in email clients with some of the major players such as Outlook, Gmail and iOS all lacking support.
For these reasons, if you’re going to go the inline style route for controlling your spacing around images, we recommend you
An older method for creating spacing around
your images is to include the spacing inside your images. This used to be quite commonplace but has more Aero Leads recently fallen out of fashion.
The advantage to this method is that it allows you to add spacing around your images without having to dive into the code. When you’re saving your images to use in your email, simply add some space in the area you desire your spacing to be before you save it out as seen in our example.
We want to add a 20 pixel space below and to the right of the image, so we add that in our image as we save it.