Lotus Notes HTML and Tables: How can I make this work - html

I am trying to create a newsletter style HTML email for users who are using IBM Lotus Notes 9.0.1.
I get closed, but can't exactly get it right.
Here is my code:
<html>
<head>
<title>Scoular Weekly Technology Newsletter</title>
</head>
<script>
</script>
<body bgcolor="#E0DED8" style="padding-top:30px;" height="1000px">
<table bgcolor="#FFFFFF" align="center" width="800px" cellspacing="0" border="0" cellpadding="0">
<tr>
<td>
<table cellspacing="20" cellpadding="20" border="0" width="640" align="center">
<tr width="650px">
<td bgcolor="#D7D3C7" style="padding:10px" align="center"><img alt="Scoular_HTML2" height="93" width="400px" src="" style="padding:20px"></td>
</tr>
</table>
<table cellspacing="20" cellpadding="20" border="0" width="640" align="center">
<tr width="650px">
<td bgcolor="#D7D3C7" style="padding:10px" align="left">
<span> Weekly Technology Tips</span>
<td bgcolor="#D7D3C7" style="padding:10px" align="right">
<span>IT Help Desk</span</td>
</td>
</tr>
</table>
<table cellspacing="20" cellpadding="20" border="0" width="640" align="center">
<tr width="650px">
<td bgcolor="#D7D3C7" style="padding:10px" align="center">TIP</td>
</tr>
</table>
<table cellspacing="20" cellpadding="20" border="0" width="640" align="center">
<tr width="650px">
<td bgcolor="#D7D3C7" style="padding:10px" align="center">TIP</td> </tr>
</table>
<table cellspacing="20" cellpadding="20" border="0" width="640" align="center">
<tr width="650px">
<td bgcolor="#D7D3C7" style="padding:10px" align="center">TIP</td>
</tr>
</table>
<table cellspacing="20" cellpadding="20" border="0" width="640" align="center">
<tr width="650px">
<td bgcolor="#D7D3C7" style="padding:10px" align="center">FOOTER</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
In any web tool it looks like this, which is generally how I want to it to look.:
However when I send it to Lotus Notes (I am using the testing tool PutsMail to send jt to my Lotus Notes email account, here is what I get. I know it looks almost the same, but it is not.There is extra space on the left.
I have struggled for hours trying to figure out what is wrong.
Can anyone see something that I am missing.

Related

Mustache - Postmark email conditional formatting

I am trying to conditionally render a block of HTML, dependent on the presence of a key in the JSON -> custom_invite_text.
My understanding is that the Mustachio conditions control the presence of the HTML blocks below. This is working fine, but we lose access to the dynamic data provided by the JSON. Presume it is a scoping issue, but some guidance would be good?
The following HTML is used to generate an email:
<p>{{body}}</p>
{{#custom_invite_text}}
<table class="custom_invite">
<tr class="custom_invite_rows">
<td class="custom_invite_row1"><div class="roundel"><p class="roundel-text">{{custom_invite_org}}</p></div></td>
<td class="custom_invite_row2"><p class="custom_invite_heading">From {{org_name}}</p></td>
</tr>
</table>
{{/custom_invite_text}}
{{#custom_invite_text}}
<table class="body-action custom_invite_div" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="custom_invite_text" align="left">
{{{custom_invite_text}}}
</td>
</tr>
<tr class="custom_invite_btn">
<td align="center">
<!-- Border based button https://litmus.com/blog/a-guide-to-bulletproof-buttons-in-email-design -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
{{behaviour_url_description}}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{{/custom_invite_text}}
{{^custom_invite_text}}
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0">
<tr class="custom_invite_btn">
<td align="center">
<!-- Border based button https://litmus.com/blog/a-guide-to-bulletproof-buttons-in-email-design -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
{{behaviour_url_description}}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
{{/custom_invite_text}}
Thanks.

Few Text from an HTML code is not visible on preview

I am creating an email template and the header section of the email is a code block I took from another site.
The said header code block contains a logo and few text next to it. Here is an image of it.
In the editor of the Email Service Provider I use, the code block is fully visible but when I click on preview, the text dissapears and only the logo is visible like this
Does anyone know why is that.
Here is the code
`
<td class="esd-stripe" align="center">
<table class="es-header-body" align="center" cellpadding="0" cellspacing="0" width="550" style="background-color: #f6f3f0;" bgcolor="#f6f3f0">
<tbody>
<tr>
<td class="esd-structure es-p20" align="left">
<!--[if mso]><table width="560" cellpadding="0"
cellspacing="0"><tr><td width="98" valign="top"><![endif]-->
<table cellpadding="0" cellspacing="0" class="es-left" align="left">
<tbody>
<tr>
<td width="98" class="es-m-p0r es-m-p20b esd-container-frame" valign="top" align="center">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td align="center" class="esd-block-image es-m-txt-c" style="font-size: 0px;"><a target="_blank" href="https://viewstripo.email"><img src="https://ychxix.stripocdn.email/content/guids/CABINET_d3bb686276c9132ac5465c69a2399624/images/carla_logo.png" alt style="display: block;" width="65"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if mso]></td><td width="20"></td><td width="442" valign="top"><![endif]-->
<table cellpadding="0" cellspacing="0" align="right">
<tbody>
<tr>
<td width="442" align="left" class="esd-container-frame">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr class="esd-mobile-hidden">
<td align="center" class="esd-block-spacer" height="16"></td>
</tr>
<tr>
<td class="esd-block-menu" esd-tmp-menu-color="#2d0824">
<table cellpadding="0" cellspacing="0" width="100%" class="es-menu">
<tbody>
<tr class="links">
<td align="center" valign="top" width="33%" class="es-p10t es-p10b es-p5r es-p5l"><a target="_blank" href="https://www.carlawainwright.com/" style="color: #169179;"><b>Home<b></a></td>
<td align="center" valign="top" width="33%" class="es-p10t es-p10b es-p5r es-p5l"><a target="_blank" href="https://www.carlawainwright.com/contact" style="color: #169179;"><b>About<b></a></td>
<td align="center" valign="top" width="33%" class="es-p10t es-p10b es-p5r es-p5l"><a target="_blank" href="https://www.carlawainwright.com/about" style="color: #169179;"><b>Contact<b></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!--[if mso]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</td>
`
I tried to change the font color and backround color to see if that was overlapping the text, but it didnt work.

xpath query to parse html page

I have an html file that looks like
<HTML>
<BODY>
<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="400" align="right" valign="top" class="text_rail_left"></td>
<td width="100%" align="left" valign="top" class="text_back_color"><table border="0" cellPadding="0" cellSpacing="0" width="100%"><tr>
</tr><tr>
<td width="100%" align="left" align="top"><table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="center" valign="top" class="inside_heading_text">Train Names with Details</td>
</tr> <tr>
<td><b><BR><BR> SORRY !!! No Matching buses Found</b></td></tr>
<tr><td>
</td></tr></table>
<td align="left" valign="top" class="pad_self"><table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr><td align="right" valign="top"> </td>
</tr></table></td>
</tr></table></td>
<td align="left" valign="top" class="text_rail_right"> </td>
</tr>
<tr>
<td width="10" align="left" valign="top"><img src="http://www.indianrail.gov.in/main_text_left_bottom2.gif" alt="" width="8"/></td>
<td width="100%" align="left" valign="top" class="text_rail_bottom"><img src="http://www.indianrail.gov.in/blank.gif" alt="" width="1" height="8" /></td>
<td width="10" align="right" valign="top"> <img src="http://www.indianrail.gov.in/main_text_right_bottom2.gif" alt="" width="8" /></td>
</tr></table><body>
<FONT size=1>No. of Queries : 0839425885
, Server : YAMUNA
, Dated : 15-05-2014 Time:07:15:26 Hrs</font></td></tr></table></td></tr> </table></td></tr></table></td></tr></table></td></tr><tr><td align="left"valign="top"><table width="970" border="0" cellspacing="0" cellpadding="0"><tr> <td width="9" align="left" valign="top"><img src="http://www.indianrail.gov.in/images/footer_upper_lft.gif" alt="" width="9" height="49" /></td><td width="100%%" align="left" valign="top" class="footer_upper"><table width="100%%" border="0" cellspacing="1" cellpadding="0"><tr><td align="center" valign="top" class="main_footer_upper">Home | Ministry of Railways | Trains between Stations | Booking Locations | CRIS | CONCERT | Advertise with CRIS | Railway Map | FAQ | Sitemap | Feedback</td></tr><tr><td align="center"valign="top" class="copy_footer" style="padding-top:3px;"><span class="main_footer_copy">Copyright</span> © 2010, Centre For Railway Information Systems, Designed and Hosted by CRIS | <span class="main_footer_copy">Disclaimer</span><br />Best viewed at 1024 x 768 resolution with Internet Explorer 5.0 or Mozila Firefox 3.5 and higher</td></tr> </table></td><td width="9" align="right" valign="top"><img src="http://www.indianrail.gov.in/images/footer_upper_rgt.gif" alt="" width="9" height="49" /></td></tr></table></td></tr></table></td></tr></table><script type="text/javascript">anylinkmenu.init("menuanchorclass")</script>
</BODY>
</HTML>
I want to write an xpath query to read the string
SORRY !!! No Matching buses Found
There's no unique class that identifies the class with the string. I tried the xpath query
#"//td[#class='inside_heading_text']/tr"
but it doesnt seem to work.
Can someone point me in the right direction? I'm using the ONO library in Objective-C to parse the html.
Well, this would get you the container of the "SORRY" text
//*[contains(text(),'SORRY')]
I recommend firefinder extension for firebug (on firefox) for an easy way to try xpaths.
That's some ugly HTML you got there.
There are unclosed elements, repeated td/#align attributes, etc. You're going to have to clean it up first if you want to use XPath.
If you can manually or automatically clean it up at least to this point:
<?xml version="1.0" encoding="utf-8"?>
<HTML>
<BODY>
<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="400" align="right" valign="top" class="text_rail_left">
</td>
<td width="100%" align="left" valign="top" class="text_back_color">
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr>
</tr>
<tr>
<td width="100%" align="left">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="center" valign="top" class="inside_heading_text">Train Names with Details</td>
</tr>
<tr>
<td>
<b>
<BR/>
<BR/> SORRY !!! No Matching buses Found</b>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td align="left" valign="top" class="text_rail_right"></td>
</tr>
</TABLE>
</BODY>
</HTML>
Then this XPath will select the "SORRY..." text given the inside_heading_text point of reference that you mention:
//td[#class='inside_heading_text']/../following-sibling::tr[1]/td[1]/b

Border wont remove in html table

I've got a HTML table with several cells inside, the border=0 property is set yet the border does not go away, what am I doing wrong?
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td>
<br><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
Change the first cell spacing to 0
So here's the code:
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0"
bgcolor="#CCCCCC">
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><br>
<br></td>
</tr>
</table>
</td>
</tr>
</table>

HTML Email and Lotus Notes - Content is repeating

I have an HTML Email campaign that I have tested with EmailOnAcid.com. The email displays fine in almost all clients except Lotus Notes v6.5, v7, v8 :(
In Lotus Notes 6.5 & 7, at the end of the email, Lotus seems to repeat the email from the start again, so it looks like the same email has been put in twice, but it hasn't.
Is there a mimimum height for HTML emails in Lotus? (height of my email is around 474px).
I have specified height on all image elements and on tags.
In Lotus Notes 8, there is a minor problem; the lower part of the footer image repeats itself?
Does anyone have ideas as to what is causing these problems??
Thanks in advance.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Email</title>
</head>
<body>
<table cellpadding="0" cellspacing="0" border="0" width="650" align="center">
<tr>
<td width="650">
<table cellpadding="0" cellspacing="0" border="0" width="650">
<tr>
<td width="650">
<table cellpadding="0" cellspacing="0" border="0" width="650">
<tr>
<td width="650"><img src="http://www.website.com/images/hdr.jpg" width="650" height="36" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="650">
<table cellpadding="0" cellspacing="0" border="0" width="650">
<tr>
<td width="137" height="53"><img src="http://www.website.com/images/hdr_left.gif" width="137" height="53" border="0" alt="" style="display:block;margin:0;"></td>
<td width="513" height="53"><img src="http://www.website.com/images/hdr_right.jpg" width="513" height="53" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="650">
<table cellpadding="0" cellspacing="0" border="0" width="650">
<tr>
<td width="650"><img src="http://www.website.com/images/spacer_top.jpg" width="650" height="28" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="650">
<table cellpadding="0" cellspacing="0" border="0" width="650">
<tr>
<td width="397" valign="top"><img src="http://www.website.com/images/gold_main.jpg" width="397" height="271" border="0" alt="" style="display:block;margin:0;"></td>
<td width="240" valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="240">
<tr>
<td><img src="http://www.website.com/images/title_text.gif" width="240" height="105" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
<tr>
<td><img src="http://www.website.com/images/spacer_white.gif" width="240" height="12" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
<tr>
<td><font style="font-family:verdana; font-size:10px;" color="#808180"><b>TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE</b></font></td>
</tr>
<tr>
<td><img src="http://www.website.com/images/spacer_white.gif" width="240" height="12" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
<tr>
<td><font style="font-family:verdana; font-size:10px;" color="#808180"><b>TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE TEXT GOES HERE</b></font></td>
</tr>
</table>
</td>
<td width="13"><img src="http://www.website.com/images/spacer_white.gif" width="13" height="2" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="650" height="12"> </td>
</tr>
<tr>
<td width="650">
<table cellpadding="0" cellspacing="0" border="0" width="650" height="85">
<tr>
<td width="397" height="85"><img src="http://www.website.com/images/ftr_left_cmras.jpg" width="397" height="85" border="0" alt="" style="display:block;margin:0;"></td>
<td width="253" height="85"><img src="http://www.website.com/images/ftr_right_lnk.gif" width="253" height="85" border="0" alt="" style="display:block;margin:0;"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
It appears this might be an issue with the EmailsOnAcid testing system.