I’m having trouble with my email CSS. The a:visited and a:hover styles don’t seem to work in Outlook or Gmail. Here’s what I’ve tried:
/* normal link */
a {
color: #334455;
}
/* after clicking */
a:visited {
color: #FFCC00 !important;
}
/* mouse over */
a:hover {
color: #FFCC00 !important;
}
/* while clicking */
a:active {
color: #FFCC00 !important;
}
.nav-item a:visited,
.nav-item a:hover {
color: #FFCC00 !important;
}
I thought using !important would force it to work, but no luck. Any ideas why these styles aren’t applying in those email clients? Is there a workaround?
As someone who’s worked extensively with email marketing, I can tell you that email clients are notoriously finicky when it comes to CSS support. Outlook and Gmail are particularly infamous for this.
The harsh reality is that :visited and :hover states simply don’t work in most email clients. It’s not just you - it’s a limitation we all face in email design.
From my experience, the best approach is to keep things simple. Stick to basic inline styles for your links. Something like Link Text is your safest bet.
For interactive elements, I’ve had some success using VML for Outlook and media queries for other clients. It’s not perfect, but it can give you some hover-like functionality.
Remember, email design is all about graceful degradation. Design for the lowest common denominator, then enhance where possible. It’s frustrating, but that’s the nature of the beast in email development.