How to make entire Mailchimp button clickable? - html

When you add a button on a Mailchimp template, only the text within the button is clickable. Not sure why they designed it this way...is there a good reason for this?
If not, is there an easy way to make the entire button clickable...I've thought about just creating a button image...and making it linked...but trying to avoid that if possible.

Give this article and technique a go.
https://www.emailonacid.com/blog/details/C13/bulletproof_buttons_for_office_365_and_everything_else
I use it every where and it has a fall back for Outlook.
Be sure to check the comments for any tips from users who have figured a few quirks out from the originally supplied snippet.
Like my comment about adding stroke="f" to the snippet to remove the default stroke on linked buttons.

The easiest way to get a button fully clickable is to build the button with an HTML table and wrap the table in an anchor, like so:
<a href="http://www.website.com">
<table border="0" width="">
<tr>
<td><span>Click Here</span></td>
</tr>
</table>
</a>
It is not valid in HTML4, but is valid in HTML5, but not much of what goes into an HTML email is valid, so I do not worry about it.
The problem with this approach is that it is still hard to edit in most, if not all, HTML Email platforms, such as Mail Chimp or Campaign Monitor. A non-coder who sends email will have to go into HTML view to edit the email - not ideal.
In MailChimp, their editor breaks the parent anchor, stripping it out altogether.
Test it in your email platform of choice, it is a simple solution.

Related

Within a table do I need to have thead, tbody and tfooter?

Guys I'm making an email for the first time in html, and I need to do this email in html, I don't want a ready solution please.
Within a table do I have to have thead, tbody and tfooter?
I believe that for the sake of semantics yes, but in an email need ??
Simple answer: No, you don't.
Some ESPs will insert these for you (when you post your code into a platform) but ultimately they aren't required for modern email clients.
I never include them. My structure is always as follows:
<table border="0" cellpadding="0" cellspacing="0" class="class-name" style="width:###px;">
<tr>
<td>
<!-- CONTENT GOES HERE -->
</td>
</tr>
</table>
However, it is important to note that including these tags isn't detrimental to your HTML.
So completely up to you if you decide to include them.
I would suggest checking out these links to get more up to speed on the industry standard for coding emails:
Build an HTML Email Template From Scratch - Learn the basics of email template development from Nicole Merlin, a renowned expert in the email industry.
Creating a Simple Responsive HTML Email - Also by Nicole Merlin however she now takes you through the more modern responsive email development techniques.
I would recommend taking the time to review these and follow along to really understand what is going on. There are other tutorials out there too, so you don't necessarily need to use the two above. They'll at least give you a starting point in what to search for.
Some useful links for better understanding how to create an email in html :) Please use the suggestions for a better experience :)
https://webdesign.tutsplus.com/articles/build-an-html-email-template-from-scratch--webdesign-12770

Email Subtitle - Is there an easy way to do this?

I am using a header and footer which I upload to my companies campaign manager program. This header and footer cannot be changed. But I want to change the subtitle which appears on some email clients after the Subject next to the unopened email (which currently has the first line of the email which is "click here if email has not loaded"). Is there anyway I can change the subtitle through the content beneath the header? If not is there a way I can have a subtitle which is not "click here" which does not appear directly on my email.
I really don't see a way to do this without being able to edit the email header contents (which is where I assume this "Click here" text is located).
In the past to correct a similar issue, I have either moved that text down farther into the content or footer of the email, or replaced it with an image (having alt text to show in case images do not load). The latter choice is a matter of personal preference and probably not ideal. That said, however, these solutions require changing the header.
To change it you need access to the Header Contents
To change the preview of your email you can only use a hack. As it will always display the first lines of your email, you'll have to edit your email template to start it with whatever catchphrase you want in your email preview.
However, I'm pretty sure you don't want to add an extra sentence that will display before your email so here is the trick: use a 1px by 1px transparent gif with your catchphrase in the ALT tag.
<img alt="YOUR CATCHPHRASE" src="your-transparent-gif.gif" width="1" height="1" border="0">

Making only the link destination editable in MailChimp

Is there a way to only allow a user to edit a link's destination, and not the link itself, using MailChimp's template language? There doesn't seem to be anything about this specific situation in their documentation.
For example:
<a href="link.html" target="_blank">
<img src="button.gif" alt="Button Name" />
</a>
So I want to allow the user to ONLY edit "link.html" to point somewhere else, as the link button never changes.
Unfortunately, to make matters more complicated, there's an unknown number of links in the template (thanks to the use of mc:repeatable), so the solution cannot be hard-coded to a specific link.
Is this possible?
I ran into exactly the same issue today. It seems the individual href attribute cannot currently be made dynamic using merge tags in Mailchimp.
The best workaround I've found is to create an editable field (span) within the repeatable section that contains the link and button image.
<tr mc:repeatable>
<td width="600px">
<span mc:edit="offer_link">
<a href="http://www.mywebsite.com" target="_blank">
<img src="http://www.mywebsite.com/images/button.png" width="100" height="30" alt="view offer button">
</a>
</span>
</td>
</tr>
When the sender creates the email from the template, they can click the '<>' icon in the editor to edit the html for the link. They'll need some very basic HTML knowledge but it'll do the trick.
In your MailChimp template, instead of using <a href="link.html" target="_blank">, use a Merge Tag instead. So for example:
<a href="*|CUSTOM_URL|*" target="_blank">
Follow these steps to complete the set up:
Go to Lists > Create Forms and add a new input field.
With the field selected, click on Field Settings.
Label the field Custom Url.
Set the Field Tag to CUSTOM_URL
Uncheck Required Field.
Set Field Visibility to Hidden.
Set the Default Merge Tag Value to http://www.example.com/new-link.html (in other words, this is where the SENDER would input the absolute URL that you want your link.html changed to before sending each Campaign.
When the Campaign is sent, it will automatically fill in this default link (new-link.html) for the href attribute on the link without the SENDER actually modifying the campaign.
Just be sure that no one actually enters a value into this field when adding subscribers or it will override the default value set by the SENDER.
I have come to the same conclusion as many here, there is no easy way to do this in MailChimp, or Campaign Monitor.
In MailChimp, the only current way is to use their boilerplate templates that have "Content Blocks," which make editing very simple - you just can't custom code your own template. What we need is the ability to code custom templates with 'Content Blocks,' which is not currently available in MailChimp.
Read about Content Blocks Here:
http://kb.mailchimp.com/campaigns/content-blocks/about-content-blocks

Removing the text-decoration in an HTML mailer for Gmail and Yahoo

I've created HTML mailers before, but I just cannot figure out how to remove the text-decoration from a link using inline styles for the Gmail/Yahoo clients. I am getting the link colors the way I want them, but gmail is inserting that ugly blue line under every link. I have tried
link
And
<span style="text-decoration:none">link</span>
I am using the F12 tools to inspect the email, and the inline styles are completely blown away by the email client and don't appear. I have a very basic template with no overriding properties - am I missing something that I need for Gmail?
Your code seems correct, I suspect it's actually the client you're sending the emails FROM that is stripping the code.
Outlook 2013 for example will strip text-decoration:none from anchor tags when sending HTML emails. Try sending your emails from an alternative client and see if you still have issues with the tags being stripped.
Try using the real color code. Not sure if the closing semicolon makes a difference also... This always works for me (in Gmail at least)
click here
On a side note, Gmail is known to break #FFFFFF and #000000 (pure black or white). In that case I use #FFFFF9 and #000001 instead.
Try this:
<a href="link" target="_blank" style="text-decoration:none;">
<span style="color:red;">link</span>
</a>

Form Within A Form & Table Not Appearing

I have a form within a table which is within another form. My problem is that the embedded form tag is not appearing - the input and iframe appears, but the form tags do not appear. The table and outer form appear. What's wrong?
<form>
<table id=\"mytableid\">
<tr class=\"form_row\">
<td align=\"right\">
Upload Photo:
</td>
<td align=\"left\">
<form action=\"/myuploadpath\" method=\"post\" enctype=\"multipart/form-data\" target=\"upload_target\" id=\"photo_url_upload_form\" name=\"venue_photo_url_upload_form\">
<input type=\"file\" name=\"photo_url\" id=\"photo_url\" size=\"40\" />
<iframe id=\"upload_target\" name=\"upload_target\" src=\"#\" style=\"width:0;height:0;border:0px solid #fff;\"></iframe>
</form>
</td>
</tr>
</table>
</form>
Putting a form inside another form is not valid HTML. When this happens each browser will do different things with the markup. Some ignore parts, some break, etc. Either way you shouldn't do this.
Edit
If you are using tables for layout purposes, you technically shouldn't be. They are only meant for tabular data. You should use divs/spans and CSS to create the look you want on your site. A great place to learn about this stuff is W3C Schools.
I assume you're using something like Firebug or the Chrome DOM Inspector to look at your DOM tree and you can't see the inner <form>. These tools inspect the DOM itself, not the HTML source. That is, they show you what the browser has interpreted from your HTML. The problem in this case is that nesting a <form> within another <form> is invalid, and hence the browser has ignored it and continued parsing the rest of the document.
Obviously, the fix is to ditch that outer form since it's not doing anything. If you have it there for styling purposes, perhaps use a <div> with a class.