Hi! Inline CSS styles (in this case, margin-top: 0px; margin-bottom: 0px are added to each <p> tag when I open the email in HTML edit mode. This clutters up my HTML and makes it very difficult to edit.
Is there a way to manage styles of tags (div, p, h1, etc), not just classes, with external CSS (like classes are), instead of having unwanted styles injected into HTML? I can't find a way to change simple tag styles, without nesting them in a div with a class (not semantic at all).
Thanks for reaching out to us with your questions about CSS, HTML, and tags. To start, what kinds of changes are you looking to make? Depending on what changes you are tying to make, it could be possible without using code. I took a look at your account, and I see you are looking to modify the CSS using your own style sheet. Unfortunately, there is not a whole lot that can be done here as far as adding new classes to our style sheet, but you can make changes to the existing styles. The style sheet lets you make tweaks to the existing styles, but is not very accepting to adding or taking anything out. I think an option that may be better for you is to use our Custom Code option. This way, you have more granular control over the way the email will render. I have created a case with our upper level support team to reach out to you on the main email address in your account within the next 3-4 business days to better explain this to you, as it is a more advanced topic. Please let us know if you have any other questions in the meantime.
I don't think I've received an email from the upper level support team yet. I've been using custom HTML with inline CSS within our "Friday Facts" email campaign, but I'm passing off the responsibilities of sending emails to someone else, and would like to simplify the code as much as possible.
The initial question referred to styles that Constant Contact injects inline after saving, that clutter up the code in Code View. If I add a plain <p> tag in code view, then save it, it becomes <p style="margin-top: 0px; margin-bottom: 0px;">. I understand that these styles may be necessary to maintain consistency between email clients and browsers, but can't these be added only when sending (not added to code view). I realize that this is a seemingly trivial request, but I'd like to use semantic p tags, instead of <div class="p"> like Constant Contact wants me to. But now I see that this question would require a lot of work for minimal customer base need.
The bigger question that might be more worth your time: Is there no automatic inliner for external styles? I find it very difficult to add styles consistently when it's all inline all the time. I've been trying out MailChimp, and their option includes automatic inlining of CSS class styles when an email is sent, custom repeatable template blocks, etc. Are any of these features on the horizon for Constant Contact? I'm afraid I'm wasting too much time duplicating inline styles, and it's difficult to create custom emails as an HTML email designer with Constant Contact.
This is a great question for our Tier 2 technical team. It looks like they sent an email to the designated contact address on file on May 2, 2017 at 4:06 PM in regards to your initial inquiry. I would check to see if the email is hiding in your inbox. If you still can't find it I would reach out to us at social_support(at)constantcontact(dot)com with your username, the best contact email address to reach you at, and a reference to this post and we can make sure we get you the information you need.