Table borders are going out of bound on right side - html

I have made a Email template for order confirmation.
It has a table,the table layout is fine on regular devices but on the gmail application on Phone the table layout is being disturbed.
The table border is going out of bound on the right side.
Here is my code for the email template:
<div style="text-align: center; margin: 0, auto; padding: 10px;">
<a href="http://brightopaints.com/" target="_blank">
<img src="http://brightopaints.com/wp-content/themes/brightoPaints/images/BrightoPaintlogo-2.png" alt="Brighto Paint" class="FollowBlockIcon" width="102" style="width: 102px; max-width: 102px;" />
</a>
</div>
<div style="max-width: 730px; background-color: #ebebeb; border-radius: 10px; text-align: center; margin: auto !important; padding-left: 24px; padding-right: 24px;">
<h1 style="color: #514f9e; padding: 15px; font-size: 48px; font-weight: 600;">THANK YOU!</h1>
<img src="http://brightopaints.com/wp-content/themes/brightoPaints/images/truck.png" width="250" style="width: 250px; max-width: 250px;" />
<h2 style="color: #000000; padding-top: 25px; font-size: 28px; font-weight: 500;">Your order is on its way.</h2>
<h2 style="color: #000000; padding-top: 25px; font-size: 18px; font-weight: 500;">this email confirms that we have received our order ". date('ymdHis')." placed on ".date('d-m-Y')."</h2>
<hr style="border: 1.2px solid black; margin-left: 30px; margin-right: 30px; margin-top: 40px;" />
<h2 style="color: #000000; padding-top: 12px; font-size: 36px; font-weight: 300;">shipping and billing details</h2>
<div style="border: 1px solid black; border-radius: 5px; margin: 24px; padding-left: 15px; padding-right: 15px;">
<table style="width: 100%; border-collapse: collapse; border-style: hidden; overflow-x: auto;">
<tbody>
<tr>
<td style="border: 2px solid white; padding: 8px;">User Name</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$person_name."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">User Email</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$person_email."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">Contact Number</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$person_number."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">Address</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$complete_address."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">Product Name</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$product_name."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">Product Shade</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$product_shade_name."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">Type/Packaging</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$product_type_packaging."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">Quantity</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$product_quantity."</td>
</tr>
<tr>
<td style="border: 2px solid white; padding: 8px;">Order Message</td>
<td style="font-weight: bold !important; border: 2px solid white; padding: 8px;">".$order_message."</td>
</tr>
</tbody>
</table>
</div>
<h2 style="color: #000000; padding-top: 12px; padding-left: 22px; font-size: 36px; font-weight: 300; text-align: left !important;">Total :</h2>
<h2 style="color: #000000; padding-top: 12px; padding-left: 22px; font-size: 20px; font-weight: 300; text-align: left !important;">subtotal :</h2>
<h2 style="color: #000000; padding-top: 62px; padding-left: 22px; padding-right: 22px; padding-bottom: 62px; font-size: 15px; font-weight: 500; text-align: center !important;">
if anything doesn't look right, simply contact us at our <span style="color: #537bed; text-decoration: underline;">Toll Free: 08000-1973</span> if it hasn't been dispatched, we will get it sorted right away.
</h2>
</div>
I have tried to use overflow:hidden; but then my content is cut off.
Here is what I am getting:

Use table-layout:fixed; for table and for all td to word-wrap:break-word;
NOTE:
I have added the word-wrap:break-word; ONLY for email due to inline css elements so please do the same for all other td.
<div style='text-align: center;margin: 0,auto;padding: 10px;'>
<a href='http://brightopaints.com/' target='_blank'><img src='http://brightopaints.com/wp-content/themes/brightoPaints/images/BrightoPaintlogo-2.png' alt='Brighto Paint' class='FollowBlockIcon' width='102' style='width:102px; max-width:102px;'></a>
</div>
<div style='max-width: 730px;background-color: #ebebeb;border-radius: 10px;text-align: center; margin: auto !important;padding-left: 24px;padding-right: 24px;'>
<h1 style='color: #514f9e;padding: 15px;font-size: 48px;font-weight: 600;'>THANK YOU!</h1>
<img src='http://brightopaints.com/wp-content/themes/brightoPaints/images/truck.png' width='250' style='width:250px; max-width:250px' />
<h2 style='color: #000000;padding-top: 25px;font-size: 28px;font-weight: 500;'>Your order is on its way.</h2>
<h2 style='color: #000000;padding-top: 25px;font-size: 18px;font-weight: 500;'>this email confirms that we have received our order ". date('ymdHis')." placed on ".date('d-m-Y')."</h2>
<hr style='border: 1.2px solid black;margin-left: 30px;margin-right: 30px;margin-top: 40px;'>
<h2 style='color: #000000;padding-top: 12px;font-size: 36px;font-weight: 300;'>shipping and billing details</h2>
<div style='border: 1px solid black;border-radius: 5px;margin: 24px;
padding-left: 15px;padding-right: 15px;'>
<table style='width: 100%;border-collapse: collapse;border-style: hidden;overflow-x:auto;table-layout:fixed;'>
<tbody>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>User Name</td>
<td style='font-weight: bold !important;border: 2px solid white;
padding: 8px;'>".$person_name."</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>User Email</td>
<td style='font-weight: bold !important;border: 2px solid white;
padding: 8px; word-wrap:break-word;'>dsfadsfasdfasdfsddsfadsfasdfasdfsdafasdfasdfadfadsfadsfasdfasdfsdafasdfasdfadfaafasdfasdfadfa#gmail.com</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>Contact Number</td>
<td style='font-weight: bold !important;border: 2px solid white;
padding: 8px;'>".$person_number."</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>Address</td>
<td style='font-weight: bold !important;border: 2px solid white;
padding: 8px;'>".$complete_address."</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>Product Name</td>
<td style='font-weight: bold !important;border: 2px solid white;
padding: 8px;'>".$product_name."</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>Product Shade</td>
<td style='font-weight: bold !important;border: 2px solid white;
padding: 8px;'>".$product_shade_name."</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>Type/Packaging</td>
<td style='font-weight: bold !important; border: 2px solid white;
padding: 8px;'>".$product_type_packaging."</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>Quantity</td>
<td style='font-weight: bold !important; border: 2px solid white;
padding: 8px;'>".$product_quantity."</td>
</tr>
<tr>
<td style='border: 2px solid white;
padding: 8px;'>Order Message</td>
<td style='font-weight: bold !important;border: 2px solid white;
padding: 8px;'>".$order_message."</td>
</tr>
</tbody>
</table>
</div>
<h2 style='color: #000000;padding-top: 12px;padding-left: 22px; font-size: 36px;font-weight: 300; text-align: left !important;'>Total : </h2>
<h2 style='color: #000000;padding-top: 12px;padding-left: 22px;font-size: 20px;font-weight: 300;text-align: left !important;'>subtotal : </h2>
<h2 style='color: #000000;padding-top: 62px;padding-left: 22px;padding-right: 22px;padding-bottom: 62px;font-size: 15px;font-weight: 500;text-align: center !important;'>
if anything doesn't look right, simply contact us at our <span style='color: #537bed;text-decoration: underline;'>Toll Free: 08000-1973</span> if it hasn't been dispatched, we will get it sorted right away.
</h2>
</div>

Related

Email template not rendering correctly in Gmail Client Iphone

How to make email-templates with a fixed-width for Iphone? If a width is longer than viewport - reduce the scale.
Now the issue I am having seems to be possibly with email sizing within Gmail Client on iOS on the iPhone. Although this template seems to look ok in all clients, the result I am getting in Gmail Client on Iphone looks compressed:
Email template rendering in Android:
Email template rendering in IOS(Iphone):
Html code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Performance Scorecard</title>
</head>
<body>
<table width="640" border="0" cellpadding="0" cellspacing="3" style="font-family: 'Trebuchet MS', Helvetica, sans-serif; font-size: 15px;">
<tr>
<td colspan="2" style="padding-bottom: 5px; text-align: left;">Hi <span>{FirstName}</span>,</td>
</tr>
<tr>
<td colspan="2" style="padding-bottom: 5px; text-align: left;">Your Performance Scorecard for the month of <span>{MonthAndYear}</span> is ready!</td>
</tr>
<tr>
<td width="180" align="left" style="width: 180px; border: 1px solid #CACACA; padding: 3px; border-radius: 5px">
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" style="width: 180px;">
<tr>
<td colspan="2" style="width: 100%; padding-bottom: 20px; padding-top: 3px; text-align: center;"><img src=cid:logoLR width="100"></td>
</tr>
<tr>
<td style="padding-right: 5px;"><img width="65" height="65" style="border-radius: 50%; overflow: hidden;" src=cid:{imgCId}></td>
<td>
<span style="font-size: 14px; font-weight: 500;">{UserName}</span><br /><span style="font-size: 12px; color:#BDBDBD;">{JobTitle}</span><br /><span style="font-size: 12px; color:#BDBDBD;">{TenantName}</span>
</td>
</tr>
<tr>
<td style="font-weight: bold; font-size: 24px; padding-top: 15px; text-align: center;">
<span>{AverageRating}</span>
</td>
<td style="padding-top: 15px;">
<table cellspacing="0" cellpadding="0" border="0" style="font-size: 14px;">
<tr>
<td style="text-align: right; padding-left: 7px;">{RatingsCount}</td>
<td style="padding-left: 5px;">Ratings</td>
</tr>
<tr>
<td style="text-align: right; padding-left: 7px;">{ReviewsCount}</td>
<td style="padding-left: 5px;">Comments</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="padding-top: 15px;">
<table cellpadding="0" border="0" style="width: 100%;">
<tr>
<td style="text-align: center;"><img width="30" height="30" src=cid:{firstStar}></td>
<td style="text-align: center;"><img width="30" height="30" src=cid:{secondStar}></td>
<td style="text-align: center;"><img width="30" height="30" src=cid:{thirdStar}></td>
<td style="text-align: center;"><img width="30" height="30" src=cid:{fourthStar}></td>
<td style="text-align: center;"><img width="30" height="30" src=cid:{fifthStar}></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="490" align="left" valign="middle" style=" width: 495px; border: 1px solid #CACACA; vertical-align: middle; padding: 3px; border-radius: 5px">
<table border="0" cellspacing="0" cellpadding="0" align="left" style="width: 100%;">
<tr>
<td>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
{blockTemplate}
</tr>
</table>
<table cellspacing="3" cellpadding="0" style="width: 100%;">
<tr>
<td style="border: 1px solid #CACACA; padding: 3px;">
<table cellspacing="0" cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
<tr>
<td></td>
<td style="background-color: #95B3D7; border: 1px solid #B4C9E3; text-align: right; padding: 3px 5px; font-size: 11px;">{MonthAndYear}</td>
<td style="background-color: #95B3D7; border: 1px solid #B4C9E3; text-align: right; padding: 3px 5px; font-size: 11px;">Since Go-Live</td>
</tr>
<tr>
<td style="border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">Review Requests Sent</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">{SurveysSentPastMonth}</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">{SurveysSentAllTime}</td>
</tr>
<tr>
<td style="border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">Review Requests Responded</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">{SurveysRespondedPastMonth}</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">{SurveysRespondedAllTime}</td>
</tr>
<tr>
<td style="border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">Response Rate</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">{ResponseRatePastMonth}</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">{ResponseRateAllTime}</td>
</tr>
<tr>
<td style="border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">Online Review Site Redirects</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">{ReviewRedirectionsPastMonth}</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">{ReviewRedirectionsAllTime}</td>
</tr>
<tr>
<td style="border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">Online Reviews Added</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">{ExternalReviewsAddedPastMonth}</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #DBE5F1; padding: 3px 5px; font-size: 11px;">{ExternalReviewsAddedAllTime}</td>
</tr>
<tr>
<td style="border: 1px solid #B4C9E3; background-color: #FFFF; padding: 3px 5px; font-size: 11px;">Conversion Rate</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">{ConversionRatePastMonth}</td>
<td style="text-align: right; border: 1px solid #B4C9E3; background-color: #FFF; padding: 3px 5px; font-size: 11px;">{ConversionRateAddedAllTime}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
{blockComments}
<!-- end main -->
<tr>
<td colspan="2" style="padding-bottom: 5px; text-align: left;">Please click on this link to view your complete scorecard.</td>
</tr>
</table>
</body>
</html>

Left border for all rows

I can't make border-left all for all rows.
Is it possible without CSS?
style="border-left: 1px solid #000;"> 
This should be in all rows, but it's not. What am I doing wrong?
<p style="border-bottom: 1px solid #000; color: -internal-quirk-inherit;"> </p>
<table style="background-color: white; font-family: lato; text-align: left; color: #000000; font-size: 14px; line-height: 21px; padding: 10px; height: 42px;">
<tbody>
<tr style="height: 21px;">
<td style="width: 100px; padding-right: 50px; padding-left: 50px; text-align: center; height: 42px;" rowspan="4">
<p>
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/JEMIOL.png" width="100px" />
</p>
<p>
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/FACEBOOK.png" width="25px" />
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/INSTAGRAM.png" width="25px" />
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/LINKEDIN.png" width="25px" />
</p>
</td>
<td style="width: 19px; height: 42px;" rowspan="4">
<p style="border-left: 1px solid #000;"> </p>
</td>
<td style="padding-top: 1px; padding-bottom: 1px; font-weight: bold; width: 344px; height: 1px;" colspan="4">DAMIAN DĄBROWSKI</td>
</tr>
<tr style="height: 1px;">
<td style="padding-top: 1px; padding-bottom: 1px; width: 344px; height: 10px;" colspan="4">ADMINISTRATOR STRONY INTERNETOWEJ</td>
</tr>
<tr style="height: 1px;">
<td style="padding-top: 1px; padding-bottom: 1px; width: 344px; height: 21px;" colspan="4"><a style="color: #000000; text-decoration: none;" href="-">-</a></td>
</tr>
<tr style="height: 1px;">
<td style="padding-top: 1px; padding-bottom: 1px; width: 344px; height: 10px;" colspan="4"><a style="color: #000000; text-decoration: none;" href="-">-</a></td>
</tr>
</tbody>
</table>
<p style="border-top: 1px solid #000; color: -internal-quirk-inherit;"> </p>
Right now you only have border on the P tag
You mean
<td style="width: 19px; height: 42px; border-left: 1px solid #000;" rowspan="4">
<p style="border-bottom: 1px solid #000; color: -internal-quirk-inherit;"> </p>
<table style="background-color: white; font-family: lato; text-align: left; color: #000000; font-size: 14px; line-height: 21px; padding: 10px; height: 42px;">
<tbody>
<tr style="height: 21px; ">
<td style="width: 100px; padding-right: 50px; padding-left: 50px; text-align: center; height: 42px;" rowspan="4">
<p>
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/JEMIOL.png" width="100px" />
</p>
<p>
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/FACEBOOK.png" width="25px" />
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/INSTAGRAM.png" width="25px" />
<img src="http://serwer1528495.home.pl/jemiol/SIGNATURE/LINKEDIN.png" width="25px" />
</p>
</td>
<td style="width: 19px; height: 42px; border-left: 1px solid #000;" rowspan="4">
<p> </p>
</td>
<td style="padding-top: 1px; padding-bottom: 1px; font-weight: bold; width: 344px; height: 1px;" colspan="4">DAMIAN DĄBROWSKI</td>
</tr>
<tr style="height: 1px;">
<td style="padding-top: 1px; padding-bottom: 1px; width: 344px; height: 10px;" colspan="4">ADMINISTRATOR STRONY INTERNETOWEJ</td>
</tr>
<tr style="height: 1px;">
<td style="padding-top: 1px; padding-bottom: 1px; width: 344px; height: 21px;" colspan="4"><a style="color: #000000; text-decoration: none;" href="-">-</a></td>
</tr>
<tr style="height: 1px;">
<td style="padding-top: 1px; padding-bottom: 1px; width: 344px; height: 10px;" colspan="4"><a style="color: #000000; text-decoration: none;" href="-">-</a></td>
</tr>
</tbody>
</table>
<p style="border-top: 1px solid #000; color: -internal-quirk-inherit;"> </p>

Simple HTML formatting for Outlook Email Signature

I am running into a problem creating an HTML signature for Outlook mobile. I want it to exactly match the signature (used firmwide) I have for my desktop outlook. See below for a picture.
Currently, I am using this code and while the layout is correct, I cannot get the font to change colors. When I draft an email the font is the correct color but once sent, it changes to black. Any ideas?
<table style="
border-collapse:collapse;
border:none;">
<tbody>
<tr>
<td style="
width: 467.5pt;
border-top: none;
border-right: none;
border-bottom: none;
border-image: initial;
border-left: 1.5pt solid rgb(0, 168, 126);
padding: 0 0.15in;
height: 0.25in;
vertical-align: top;">
<p style="
margin: 0 0 .0001pt;
font-size:15px;
font-family:Calibri,sans-serif;">
<strong>
<span style="
font-size:16px;
font-family:Garamond,serif;
color:#003B4C;">
FirstName LastName
</span>
</strong>
</p>
</td>
</tr>
<tr>
<td style="
width: 467.5pt;
border-top: none;
border-right: none;
border-bottom: none;
border-image: initial;
border-left: 1.5pt solid rgb(0, 168, 126);
padding: 0 0.15in;
height: 9.9pt;
vertical-align: top;">
<p style="
margin: 0 0 .0001pt;
font-size: 15px;
font-family: Calibri,sans-serif;">
<span style="
font-size: 12px;
font-family:Arial,sans-serif;
color:#003B4C;">
t.
</span>
<span style="
font-size: 12px;
font-family: Arial,sans-serif;
color: #003B4C;
text-decoration: none;">
+1 (123) 456-7891
</span>
<span style="
font-size: 12px;
font-family: Arial,sans-serif;
color: #003B4C;">
| m.
</span>
<span style="
font-size: 12px;
font-family: Arial,sans-serif;
color: #003B4C;
text-decoration: none;">
+1 (123) 456-7891
</span>
</p>
</td>
</tr>
</tbody>
</table>

Add new row in table using jquery in reactjs

I'm want to add new row using jquery any one help me to solve my problem"
'''
https://jsfiddle.net/dn6chabs/86/
jsfiddle here want to add new row
'''
So, there were quite a few issues with your code:
If you check console by hitting f12 you have this error Uncaught ReferenceError: $c is not defined because of this line: $("#field7").val($c);
I don't think it's necessary for the add and remove to be <a> tags, unless you want them specifically for styling, as it confuses the matter
$(this).parent().parent().remove(); this line doesn't really appear to do anything
Anyway, here's the corrected code!
$("#field7").val(c);, this has been corrected
The add and remove have been made <span> tags with custom styling to look like <a> tags
The onclick event has been corrected in light of this
The removal process has been fixed and is now $('#table').children().eq($("#table").children().length - 1).not('tfoot').remove();, whereby it never removes the subtotal / total line
$(document).ready(function() {
$("#add_to_table").on('click', function() {
navObj = $("#table tbody:last").clone();
$("#table").append(navObj);
});
$("#remove_from_table").on('click', function() {
$('#table').children().eq($("#table").children().length - 1).not('tfoot').remove();
});
});
$(document).ready(function() {
var a = document.getElementById("field5").innerHTML;
var b = document.getElementById("field6").InnerHTML;
c = a * b;
$("#field7").val(c);
});
.link {
text-decoration: underline;
color: blue;
cursor: pointer;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<span id="add_to_table" class="link">Add</span>
<span id="remove_from_table" class="link">Remove</span>
<table id="table" style="width: 100%; border-collapse: collapse; border-spacing: 0; margin-bottom: 20px; border: 0px;" border="0" cellspacing="0" cellpadding="0">
<thead>
<tr id="row">
<th scope="row" style="white-space: nowrap; font-weight: 400; color: #fff; font-size: 1.6em; background: #3989c6;">#</th>
<th scope="row" class="text-left" style="white-space: nowrap; font-weight: 400; color: #fff; font-size: 1.6em; background: #3989c6;">DESCRIPTION</th>
<th scope="row" class="text-right" style="white-space: nowrap; font-weight: 400; color: #fff; font-size: 1.6em; background: #3989c6;">UNITS</th>
<th scope="row" class="text-right" style="white-space: nowrap; font-weight: 400; color: #fff; font-size: 1.6em; background: #3989c6;">PRICE</th>
<th scope="row" class="text-right" style="white-space: nowrap; font-weight: 400; color: #fff; font-size: 1.6em; background: #3989c6;">TOTAL</th>
</tr>
</thead>
<tbody>
<tr>
<td id="field1" class="no" style="color: #fff; font-size: 1.6em; background: #3989c6;">01</td>
<td id="field2" class="text-left" style="padding: 15px; background: #eee; border-bottom: 1px solid #fff;">
<h3 id="field3">WebSite <em><strong>Consultansy</strong></em></h3>
<em id="field4">Tasks related to meeting minutes AbC</em>
</td>
<td id="field5" class="qty" style="padding: 15px; background: #eee; border-bottom: 1px solid #fff;">4</td>
<td id="field6" class="unit" style="background: #ddd;">$100.00</td>
<td id="field7" class="total" style="background: #3989c6; color: #fff;">$300.00</td>
<td>
</td>
</tr>
</tbody>
<tfoot style="display: table-footer-group; vertical-align: middle; border-color: inherit;">
<tr>
<td style="border: none;" colspan="2"> </td>
<td style="background: 0 0; border-bottom: none; white-space: nowrap; text-align: right; padding: 10px 20px; font-size: 1.2em; border-top: 1px solid #aaa;" colspan="2">SUBTOTAL</td>
<td style="background: 0 0; border-bottom: none; white-space: nowrap; text-align: right; padding: 10px 20px; font-size: 1.2em; border-top: 1px solid #aaa;">$300.00</td>
</tr>
<tr>
<td style="border: none;" colspan="2"> </td>
<td style="background: 0 0; border-bottom: none; white-space: nowrap; text-align: right; padding: 10px 20px; font-size: 1.2em; border-top: 1px solid #aaa;" colspan="2"><em>TAX Deductions</em></td>
<td style="background: 0 0; border-bottom: none; white-space: nowrap; text-align: right; padding: 10px 20px; font-size: 1.2em; border-top: 1px solid #aaa;">00.00</td>
</tr>
<tr>
<td style="border: none;" colspan="2"> </td>
<td style="color: #3989c6; font-size: 1.4em; border-top: 1px solid #3989c6;" colspan="2">GRAND TOTAL</td>
<td style="color: #3989c6; font-size: 1.4em; border-top: 1px solid #3989c6;">$300.00</td>
</tr>
</tfoot>
</table>
Check the fiddle: JSFiddle
Let me know how you get on!

<th> background shows incorrectly as border around table caption

I have an issue with HTML/CSS rendering in Outlook 2010.
The below HTML renders correctly in all other email clients I have tested (Thunderbird, Outlook 2003, iPhone, various webmail based products), and in various browsers too. But in Outlook 2010 I get a border around the table caption that is the same colour as the background for the tag below it.
<!DOCTYPE html>
<html>
<body>
<div style="padding: 0.3em">
<p>Here is a nice background from St Pancras Station with the Olympic Rings in the background</p>
<hr />
<table style=" width: auto; color: #000; border: 1px solid #000; border-collapse: collapse; background: #FFF;">
<caption style=" font-style: italic; text-align: left; color: #000; background: #FFF;">Files attached to this message</caption>
<tr>
<th style="border: 1px solid #000; padding: 0.3em; background: #ddd; text-align: left; vertical-align: top;">Filename</th>
<th style="border: 1px solid #000; padding: 0.3em; background: #ddd; text-align: left; vertical-align: top;">Size</th>
</tr>
<tr>
<td style="border: 1px solid #000; padding: 0.3em; text-align: left; vertical-align: top; width: 75%;">6315755363_7fbe95fc66_o.jpg</td>
<td style="border: 1px solid #000; padding: 0.3em; text-align: left; vertical-align: top; width: 25%;">5 MB</td>
</tr>
</table>
<p>Please click here to download the attachments.</p>
<p>The attachments are available until: <b>Tuesday, 11 December.</b></p>
<hr />
</div>
</body>
</html>
Can anyone suggest a fix for this issue?
EDIT
If you want to debug this you can save the HTML in a file and load it into Word 2010 as it uses the same rendering engine.
Try adding phantom row after <caption>
<caption style=" font-style: italic; text-align: left; color: #000; background: #FFF;">Files attached to this message</caption>
<tr style="background:#FFF; display:none;"></tr> <!--phantom row-->
<tr>
<th style="border: 1px solid #000; padding: 0.3em; background: #ddd; text-align: left; vertical-align: top;">Filename</th>
<th style="border: 1px solid #000; padding: 0.3em; background: #ddd; text-align: left; vertical-align: top;">Size</th>
</tr>
<!DOCTYPE html>
<html>
<body>
<div style="padding: 0.3em">
<p>Here is a nice background from St Pancras Station with the Olympic Rings in the background</p>
<hr />
<table style=" width: auto; color: #000; border-collapse: collapse;">
<tr>
<td style="border: 1px solid #fff; border-bottom-color: #000; background: #fff; text-align: left; vertical-align: top;">
<caption style=" font-style: italic; text-align: left; color: #000;">Files attached to this message</caption>
</td>
</tr>
<tr>
<th style="border: 1px solid #000; padding: 0.3em; background: #ddd; text-align: left; vertical-align: top;">Filename</th>
<th style="border: 1px solid #000; padding: 0.3em; background: #ddd; text-align: left; vertical-align: top;">Size</th>
</tr>
<tr>
<td style="border: 1px solid #000; padding: 0.3em; text-align: left; vertical-align: top; width: 75%;background: #FFF;">6315755363_7fbe95fc66_o.jpg</td>
<td style="border: 1px solid #000; padding: 0.3em; text-align: left; vertical-align: top; width: 25%;background: #FFF;">5 MB</td>
</tr>
</table>
<p>Please click here to download the attachments.</p>
<p>The attachments are available until: <b>Tuesday, 11 December.</b></p>
<hr />
</div>
</body>
</html>