StudentIT StudentIT - 3 years ago 128
HTML Question

HTML template in outlook: Couldn't align 1 text to the right

I am creating email content using HTML for Outlook. The screenshot below, I tried to make "Validate Now" align to the right right under the "ServiceNow Group Validation" but it end up in the middle. The odd is that when I change to different text that have 7 or less letters, it able to align to the right. I believe the text size do impact how it position. Where I can fix it?

Email Display from HTML

<p>&nbsp;</p>
<table style="height: 400px;" width="772" cellspacing="0" cellpadding="0">
<tbody>
<tr style="border-style: none none solid none;">
<td colspan="2"><span style="font-family: 'times new roman', times;"><img id="logo" style="float: left;" title="" src="toolbar-logo.png" alt="" width="127" height="44" /></span></td>
<td colspan="2">
<p style="text-align: right;"><span style="font-size: 14pt; font-family: 'times new roman', times;"><strong>ServiceNow Group Validation</strong></span></p>
<p style="text-align: right;"><span style="text-decoration: underline; color: #0000ff; font-size: 12pt; font-family: 'times new roman', times;"><strong>${mail_script:groupvalidation}</strong></span></p>
</td>
</tr>
<tr>
<td style="background: none; border-bottom: 3px solid #FF1A2E; height: 1px; width: 100%; margin: 0px 0px 0px 0px;" colspan="4"><span style="font-family: 'times new roman', times;">&nbsp;</span></td>
</tr>
<tr>
<td colspan="4" height="5%"><span style="font-family: 'times new roman', times;">&nbsp;</span></td>
</tr>
<tr>
<td colspan="4"><span style="font-size: 12pt; font-family: 'times new roman', times;">${manager},</span></td>
</tr>
<tr>
<td colspan="4" height="5%"><span style="font-family: 'times new roman', times;">&nbsp;</span></td>
</tr>
<tr>
<td colspan="4"><span style="font-family: 'times new roman', times;"><span style="font-size: 12pt;">As part of an active initiative to manage ServiceNow platform security, you are being requested as the group manager&nbsp;to validate <strong>${name}</strong> to ensure that&nbsp;all group members are appropriate. <strong>Important: your group must have atleast 2 active members to proceed.</strong></span>&nbsp;&nbsp;&nbsp;</span>
<p><font size="4"><strong>Please validate this group access using the following link:</strong></font></p>
<p>${mail_script:groupvalidation}</p>
</td>
</tr>
<tr>
<td colspan="4" height="5%"><span style="font-family: 'times new roman', times;">&nbsp;</span></td>
</tr>
<tr>
<td colspan="4"><span style="font-size: 12pt; font-family: 'times new roman', times;">Thank you,<br />Enterprise Service Management</span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

Answer Source

Change this line:

<p>${mail_script:groupvalidation}</p>

To this:

<div align="center">
<p>${mail_script:groupvalidation}</p>
</div> 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download