Newsletter template background colour

5 posts by 3 authors in: Forums > CMS Builder
Last Post: November 3, 2016   (RSS)

By JeffC - November 1, 2016 - edited: November 1, 2016

Hi, I am struggling to create a table with 100% width when building a newsletter template using the wysiwyg. I wondered if this was a known issue? Is the wysiwyg adding default padding perhaps?

Jeff

By Damon - November 1, 2016

Hi Jeff,

I tested and was able to successfully add a table with 100% width in the newsletter template (Newsletter Builder > Templates).

Can you let me know the exact steps you are taking and table code you are adding?

Also, when editing a newsletter template, under Advanced Settings at the bottom of the Newsletter Builder > Templates > template detail page, you can enter custom CSS the will output between the <style></style> tags in email header and body. You could enter a background color here.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By JeffC - November 2, 2016

Hi Damon, thanks for your response.

I didn't explain myself very well in my first email. But I get what you are saying.

This is a simplified version of the html I was using

<body style="width: 100%; background-color: #ffffff; margin:0; padding:0;">
<table style="width:100%; height:100px; border:0; cellspacing:0; cellpadding:0; background-color:#000000;">
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
</body>

I couldn't understand why the table wasn't going up to the edge of the screen. The reason was that the body tag were stripped out of the wysiwyg, and padding and/or margin was being applied. Following your advice, I removed the body tag from the html and put the css into the custom panel instead.

Quick question though. As I understand it, some email clients ignore any styles that are not inline. Does that mean that any css between <style></style> could be ignored?

Jeff

By Toledoh - November 2, 2016

Yep. CSS in emails is a nightmare. Google "CSS inliner" and you will find a number of web apps where you can paste your HTML with the styles etc, it will generate the inlined code. 

Zurb is the one I use. 

Litmus is also a good tool to check (paid)

Cheers,

Tim (toledoh.com.au)