Behave Annual keeps sending me emails about upcoming events. Recently, I noticed something strange in their newsletter. All the buttons and some text sections had CSS hover effects applied to them. When you hovered over them with your mouse, the color would change.
I was under the impression that Gmail removes anything added to the <head>
section of an HTML email document. However, when I inspected the element, I discovered that the hover effect style was loading from the <head>
section.
This is what the DOM looks like:
<table width="250" cellpadding="0" cellspacing="0" border="0" align="center" style="margin:0 auto;border-radius:4px" bgcolor="#C012C9" lang="x-cta">
<tbody
<tr>
<td height="52" valign="middle" align="center" style="vertical-align:middle;font-size:18px;text-align:center;font-family:Arial,Helvetica,sans-serif,'Work Sans';font-weight:bold;letter-spacing:.08em"><a href="http://mkto-ab090038.com/x0F0000k1j507RJ0SR5jXVG" style="text-decoration:none;color:#fffffe" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=en&q=http://mkto-ab090038.com/x0F0000k1j507RJ0SR5jXVG&source=gmail&ust=1475210579576000&usg=AFQjCNHzAxSjelTbM4Ko3G9gP-viljOzOw"><img src="https://ci4.googleusercontent.com/proxy/w_W_24g8lpz0y_rVlaX7m8vTQNv1CXL00edUPLYMHSwY8oEtD7ns-a-IWxZsBcjHrrFffonr-da-qa-_vITS05DwmYTE_IIv-Q7Yv_3TyoMmH8fNTqnTIKUFS0hyMCD5dcH2JQVnr6VpmkrOH5tgMTI3YeRG=s0-d-e1-ft#https://assets.bounceexchange.com/assets/uploads/users/700/38798606b59c4fe750c8af1b3c0e0461.png" style="display:block;margin:0 auto;border:0;white-space:pre-wrap;text-align:center" alt="LOOK INSIDE" class="CToWUd"></a>
</td>
</tr>
</tbody>
</table>
The CSS within <style>
in the <head>
section looks like this:
div.m1577254c07a8a7f6 * [lang=x-cta]:hover {
background-color: #c7dd40!important;
}
div.m1577254c07a8a7f6 * [lang=x-cta]:hover {
background-color: #c7dd40!important;
}
I'm curious how they are able to achieve this unique styling?