Community Forum

Over the years we have built up a community of email marketers, coders and designers that live and breathe email.

Use the Email on Acid Forum like your virtual water cooler: Stop by to discuss email code, quirky clients and fixes and post your issues (with an example of the code) for our community to offer its assistance.

 
   
How can I add padding around my text in IOS?

MarketVolt

Jr. Member
Total Posts:  39
Posted: 25 October 2016 09:40 AM

On my IOS view, it is removing my TD padding, how do I make sure it is supported? Photo and code attached.

Image Attachments
1.png
File Attachments
iospadding.txt  (File Size: 10KB - Downloads: 106)

 

Alex Ilhan

Avatar
Administrator
Total Posts:  217
Posted: 25 October 2016 09:54 AM
[ # 1 ]

Hi MarketVolt,

Welcome back to the Email on Acid forums!

In future could I ask that you share your test results, rather than posting a screenshot, please? It can be hard for us to see what’s going on in a small screenshot. If you need some help sharing your test results this should help you: https://www.emailonacid.com/help-center/article/getting-started/tutorial-getting-started/how-can-i-share-my-test-results

In terms of your issue, the table cells you are having an issue with have a class of stack set to them. You then have a media query in the <head> of your email that looks as follows;

*[class=stack] {
   float
:center !important;
   
padding:0px 0px 0px 

So you’re basically telling your email that under a width of 480px (when your Media Queries trigger) you want any cell with a class of stack to have no padding. You’ll need to modify that class to not remove the padding.

If you have any further questions please don’t hesitate to reach out.

Cheers
Alex


 

MarketVolt

Jr. Member
Total Posts:  39
Posted: 25 October 2016 10:50 AM
[ # 2 ]

Editing that portion of the style adds padding to the outside of the TD, I want to add it within the TD around the text.


 

Alex Ilhan

Avatar
Administrator
Total Posts:  217
Posted: 25 October 2016 11:13 AM
[ # 3 ]

Marketvolt,

That is occurring because you have multiple places in the email where you have the class of stack set. So when you modify that media query, it is affecting every place you have stack set.

I would advise for to fix this issue you remove the class of stack from the TD containing the text. This will stop the padding override in the media query and leave the rest of your email intact.

Cheers!
Alex