Alex Rivera | Logout

CSS not works for anchor tag in Outlook mail

Asked 2013-06-18T13:25:17.633
10

CSS applied to link in Outlook not works

HTML:

<tr>
<a href="http://www.google.com" style="color:#FFF;height:40px;width:475px;display:block;"><td style="background-color:#000;height:40px;width:475px;">Click Me</td></a>
</tr>

it only display link to "Click Me" text not to all

Note: It should display link to all td i.e. width:475 & height:40

Please help me

Thanks

Edit
Report

1 Answer

1

The obvious problem is that your link should be in your table cell:

<table>
  <tr>
    <td style="background-color:#000;">
       <a href="http://www.google.com" style="color:#FFF;height:40px;width:475px;display:block;">Click Me</a>
    </td>
  </tr>
</table>

I'd also check out Microsoft's guide for creating Outlook CSS and HTML support because there are a lot of gotchas: http://msdn.microsoft.com/en-us/library/office/aa338201(v=office.12).aspx. In general avoid block elements and floats in favor of table layouts. Also Outlook email only supports CSS1 specification.

answered 2013-06-18T13:34:51.380

Your Answer