How to bring the logo to the Right Upper side in Notification

shaik_irfan
Tera Guru

Hi,

 

I am an image which i want to display in the Right hand side. I tried with below but it is not working

 

 

Email notification script:


template.print('<br><br><img src="'+gs.getProperty('notification_logo')+'" width="276" height="35"/> <br><br>');

Notification:

 

${mail_script:notification_logo}

 

Output:

 

 

We want to display the logo at the right hand side

 

 

 

 

1 ACCEPTED SOLUTION

Thank you it is not working from the Notification Script. the same i tried from the Notification HTML Source and it got worked

 

<p style="text-align: right;">${mail_script:notification_logo}</p>

View solution in original post

5 REPLIES 5

Alberto Consonn
ServiceNow Employee
ServiceNow Employee

Hi,

use the following Email notification script:

template.print('<br><br><img src="'+gs.getProperty('notification_logo')+'" width="276" height="35" align="right"/> <br><br>');

If I have answered your question, please mark my response as correct and/or helpful.

Thank you very much

Cheers
Alberto

Its not working Alberto.

 

Is it not working because i am calling from Notification Script ?

Hi Irfan,

Try below code,

template.print('<img width="276" height="35" align="right" src="/imageName.png" />');

Copy the image name from System UI > Images > Search for notification_logo >copy and paste the name in above code. If image does not present under images, then upload one and then copy and paste.

 

Thanks,
Ajay

Matt Cordero1
Tera Guru

Hey shaik,

Try adding a table wrapper around the image and see if that helps to right-align the image for the Notification email.

template.print("<table width='100%'>");
template.print("<tbody>");
template.print("<tr>");
template.print("<td 'style=text-align:right'>");
template.print("<br /><br /><img src=" + gs.getProperty('notification_logo') + " width='276' height='35' align='right' /><br /><br />");
template.print("</td>");
template.print("</tr>");
template.print("</tbody>");
template.print("</table>");

Remove the <br /> tags as needed for placement.