I'm creating a newsletter, and i want to have panels that change background-color on mouse over.
Seeing as the newsletter wont have a head, I am defining all styles inline. I'm pretty sure most popular mail clients will block JS. So I was wondering if I can define a hover effect in the style attribute. Or is there any other solution to achieve this effect?
Peace
views:
156answers:
2
A:
I you are certain your css will not be removed, you can use a hover and a background-color property
.panel:hover {
background-color: #EFEFEF;
}
Also it does not seem possible to use a pseudo-selector in an inline style, so that might be a stopper:
nc3b
2010-05-09 06:57:59
I am certain the CSS is removed, i've been testing a lot
Moak
2010-05-09 10:00:22
A:
<style>
.panel
{
display: block;
text-decoration: none;
color: #111;
background: #eee;
}
.panel:hover
{
display: block;
text-decoration: none;
color: #111;
background: #ccc;
}
</style>
<div class="panel" href="#">Newsletter panel content</div>
Gabriel
2010-05-09 06:59:14
yeah, your email client may not be able to do it. It is always a crapshoot. I use gmail and never get the intended email result. But I don't mind, if I actually care what the newsletter says I follow the link to the website and read it from there.
Gabriel
2010-05-10 04:22:30