Reputation: 75804
The background-color (in red) in this link is only being applied to the text, not the entire link.
The link has padding too.
This is for Outlook 2010.
Does anyone know of a way to get the background-color to fill the link?
Here is an image:
<a href="#" class="btn" style="font-size: 13px; border: 1px solid #c5c4c4; color: #3c3c3c; padding: 7px 25px; display: inline-block; border-radius: 5px; font-weight: bold; text-decoration: none; background-color: red; background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%);">
Accept
</a>
Here is the css in readable format:
font-size: 13px;
border: 1px solid #c5c4c4;
color: #3c3c3c;
padding: 7px 25px;
display: inline-block;
border-radius: 5px;
font-weight: bold;
text-decoration: none;
background-color: red;
background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5));
background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%);
background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%);
background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%);
background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%);
Upvotes: 3
Views: 3541
Reputation: 75804
I ended up dropping the anchor inside its own table and styling the td to get a background and a padding.
<table class="btn-table">
<tr>
<td style="font-family: arial,helvetica,sans-serif; font-size: 13px; border: 1px solid #c5c4c4; padding: 7px 25px; border-radius: 5px; font-weight: bold; background: #e3e2e2; background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%);"><a href="#" class="btn" style="display: block; color: #3c3c3c; text-decoration: none;">Accept</a></td>
</tr>
</table>
Upvotes: 5