Background html

Hi, on the html block, how do I change the background color? Thanks

This is great, thank you! It works but oddly the entire block does not show on preview nor in the email test I just sent myself, as if it was not there at all. It just shows in design mode. :neutral_face:

Sorry, I didn’t actually test it and you’re right, it doesn’t work. But the following code will. It will not look right in the builder, but it will come through fine when you send it. Also, I deleted my previous post so as not to confuse anyone with bad code.

<div style="background-color:lightblue">
  <h3>This is a heading</h3>
  <p>This is a paragraph.</p>

perfect! Thank you so much!

Hi there, not sure if I need to open a new thread for this but feels like falls under this one still.
I’m trying to add my own custom social media images with the html block. I used the same code that worked for the text - div style - but it disappears in the email test even thou shows in the design mode. Any ideas why it would work for one and not the other?

Hi, @Raine_Boyd. If you post your code I could take a look.

Thank you! They are all for specific reshares instead of just follows in social media. Here is how it looks like in the design editor {which disappears when I send the email to myself} and below is the code:

Sorry, here is the code again:

<div align="center"><a href="!&body=I%20think%20you%20will%20love%20it%20as%20much%20as%20I%20do.%0D%0ATake%20a%20peek!%0D%0A%0D%0A"><img src="" width="50" /></a>

<a href=""><img src="" width="50" /></a>

<a href=""><img src="" width="50" /></a>

<a href="//!%20" data-pin-do="buttonPin" data-pin-config="none"><img src="" width="50" height="45"/></a></div>

So I figured out why the HTML code block is confusing everyone, including myself. The builder window is rendering your code in HTML5 but it is actually sent (and previewed) in XHTML. XHTML requires far more strict syntax/structure that HTML. It requires you to do things like close every tag. So for example, your first mailto would look something like this (I don’t know if all of those extra parameters are supported in XHTML?)

<div align="center"><EMAIL mailto=""></EMAIL>

And to fix your images, you just need to add a closing image tag </img> after your images like the example below.

<div style="background-color:#fff" align="center"><EMAIL mailto=""></EMAIL> <a href=""><img src="" width="50"></img></a></div>

It’s pretty strict and most of your code didn’t work. I would recommend based on your level of customization needs to just build it in Code builder.


got it, thank you!