Reputation: 3
I need to make this button change to background-color #838383
when users hover their mouse pointer over it, I've tried lots of things but can't get it to work.
<table width="60%">
<tbody>
<tr>
<td width="130PX" style="text-align: left;">
<a style="padding: 10px 35px; background-color: #ff0000; color: #fff; text-transform: uppercase; letter-spacing: -.2px; text-decoration: none; font-family: helvetica,arial,sans-serif; border-radius: 20px; font-size: 12px;"
href="mailto:[email protected]?subject=Subject">EMAIL US</a>
</td>
<td>
<b>Bla bla bla</b><br>
Bla bla bla..
</td>
</tr>
</tbody>
</table>
Upvotes: 0
Views: 4570
Reputation: 434
You should use a class on your <a>
tag and add a style for the hover event.
https://jsfiddle.net/yLkr9as0/
<style>
.mylink {
padding: 10px 35px;
background-color: #ff0000;
color: #fff;
text-transform: uppercase;
letter-spacing: -.2px;
text-decoration: none;
font-family: helvetica,arial,sans-serif;
border-radius: 20px;
font-size: 12px;
}
.mylink:hover {
background-color: blue;
}
</style>
<table width="60%">
<tbody>
<tr>
<td width="130PX" style="text-align: LEFT;">
<a class="mylink" href="mailto:[email protected]?subject=Subject">EMAIL US</a>
</td>
<td>
<b>Bla bla bla</b>
<br>
Bla bla bla..
</td>
</tr>
</tbody>
</table>
Upvotes: 1