Forum Discussion
Email Templates HTML Bug
Hi, everyone! My company is new to Braze and we are running into a bug with our HTML email templates.
We have created footer HTML block that we add to the bottom of our emails. This is saved as a content block. We also have uploaded the HTML for the body of the email that we are building directly into an email template, and we are adding the footer block to that.
When I add the content block of the footer, the footer block's format is getting messed up on mobile. We are seeing extraneous white lines and the text being stacked vertically. Photos attached.
The HTML is optimized for mobile and desktop. When I built a new email template without the body of that email and added the footer block, this error did not occur. When I tried uploading the body of the email as a content block and then building the email template with two content blocks (the body + footer), the issue did occur. What's strange is that when we re-uploaded the HTML to Braze with both the email body and the HTML of the footer, there were no issues. It was the exact same HTML code. We also tried uploading the HTML code to other email platforms (e.g. Mailchimp) and didn't see any issues, so we don't think it's a code error.
Has anyone seen this bug? Any way to fix so we can use the footer block properly?
- ConorIrvineSpecialist
Hey arella - welcome to the braze community!
I think I've seen similar before where a content block placement has interrupted a row/cell within a table.
Without seeing your code it's hard to say but maybe check that your content block hasn't got a forced cell width, isn't opening/closing an unintended table/row element and is placed in the right location.
Good luck!
- DavidOStrategist II
Hi arella and welcome to Braze!
Sometimes when using liquid such as content blocks it can create unintended whitespace around the liquid but not always. This may not be the issue in your case but you can try the following liquid and attempt to remove whitespace.
{% capture your_variable %} {{content_blocks.${your_content_block}}} {% endcapture %}{{your_variable | strip}}
There is more detail on it here:
Content Blocks (braze.com)
'capture' literally captures whatever string is inside it. This allows you to take that string and do other things to it such as 'strip' the whitespace from it. You can also create complex strings inside capture and store them in a single variable.
More on that here if you want to start going deeper:
Variable – Liquid template language (shopify.github.io)Worst case you still need to contact support but you now have capture in your toolbelt 🤣
Let us know how you go. - EmilyCalderonCommunity Manager
Hi there Arella! I would recommend submitting a support ticket or emailing support@braze.com for this case.
Related Content
- 2 years ago
- 2 years ago
- 2 months ago
- 10 months ago