I have a stored procedure that queries and outputs data into an email. I have been tasked with adding a legend to the email which explains the results being displayed in the table within the email. I am using an HTML editor and saved the file and opened it up within my browser (Chrome) and it looks like I want it to (Screenshot 1).
However, when I execute the sproc and the email is sent to me, the layout is all off (Screenshot 2). I view the html source of the email and it appears to be exactly as I have entered it into the stored procedure. Please ignore the black boxes blocking out contact information.
This is the statement in my procedure that adds this section to the beginning of the email. The contact information is in its own float table (left) and the legend is in it's own float table (right)
Is there anything that I can do to address the issue with HTML email rendering?
select
@HeaderHTML = @HeaderHTML + '
<br />
<div>
<table style="float:left">
<tr>
<td style="padding: 0; margin: 0; text-align: left; font-size: 12px;" align="left">The Questionable Claims email alerts you to claims determined to be anomalies. Please click the Rx.Refill number for additional detail.</td>
</tr>
<tr>
<td style="padding: 0; margin: 0; text-align: left; font-size: 12px;" align="left">For any questions, contact ...... support at ....... or by calling ........</td><br>
</tr>
<tr>
<th style="padding: 0; margin: 0; text-align: left; font-size: 18px;" align="left"># of Stores: 19</th>
</tr>
</table>
<table style="float:right; margin-bottom: 15px; margin-right: 100px" frame="box">
<tr>
<td style="padding: 0; text-align: center; font-size: 18px;"><u>Rule Violation Key</u></td>
</tr>
<tr>
<td style="padding: 0; text-align: left; font-size: 14px;"><b>1</b> - GPM > 300%</td>
</tr>
<tr>
<td style="padding: 0; text-align: left; font-size: 14px;"><b>2</b> - GPM < -100%</td>
</tr>
<tr>
<td style="padding: 0; text-align: left; font-size: 14px;"><b>3</b> - Contract Cost = $0.00</td>
</tr>
<tr>
<td style="padding: 0; text-align: left; font-size: 14px;"><b>4</b> - Cash Claim Copay = $0.00</td>
</tr>
<tr>
<td style="padding: 0; text-align: left; font-size: 14px;"><b>5</b> - Copay on Fills < $0.00</td>
</tr>
<tr>
<td style="padding: 0; text-align: left; font-size: 14px;"><b>6</b> - Claim Amount on Fills < $0.00</td>
</tr>
</table>
</div>
<br />'