I'm coding emails using adobe CRM and HTML 5 and CSS.
I have a problem with Vertical-Align:Middle it's working fine in Outlook but when forward email to gmail it's not working it's like it adds a space in my image table.
this my code
table
{
border-spacing : 0;
border-collapse : collapse;
margin: 0 auto;
}
td
{
padding: 0;
}
<table width="680" cellspacing="0" cellpadding="0" align="center">
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
<img alt="" src="1.png" style="vertical-align:middle;">
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td><img alt="" src="2.png" style="vertical-align:middle;"></td>
<td>
<img alt="" src="3.png" style="vertical-align:middle;"></td>
<td>
<img alt="" src="4.png" style="vertical-align:middle;"></td>
<td>
<img alt="" src="5.png"style="vertical-align:middle;"></td>
<td>
<img alt="" src="6.png" style="vertical-align:middle;">
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>
<img alt="" src="7.png" style="vertical-align:middle;">
</table>
Dont know why it's not working for Gmail and it's working fine for Outlook...
Can someone help me please ?
thanks
Related
Hi I'm working with a Mail template. Facing some issues with alignment in some versions of Outlook in the icons sections, maybe because of it's Word rendering engine. What alternative solution do we have to make the image align with text in Outlook ?
Icons not aligning with text.
<td style="background:#fff;">
<h2 style="color:#000000;font-size:30px;line-height:22px;font-family:'Francois One',Arial,Sans-Serif;margin:30px 0 10px;font-weight: 400;">TU PEDIDO</h2>
<h3 style="color:#000000;font-size:20px;line-height:22px;font-family:'Francois One',Arial,Sans-Serif;margin:0 0 12px;font-weight: 400;">PEDIDO #{{orderNumber}}</h3>
<p style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;margin:0 0 10px;">
<img src="https://i.postimg.cc/nzZ5SbZ8/ico-calendar2x.png" width="20" height="21" alt="" border="0" style="vertical-align: middle;" /> {{orderDate}}
</p>
<p style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;margin:0 0 10px;">
<img src="https://i.postimg.cc/NffxJGH7/ico-shop2x.png" width="20" height="21" alt="" border="0" style="vertical-align: middle;" /> {{storeName}}
</p>
<p style="font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;margin:0 0 10px;">
<img src="https://i.postimg.cc/sf58d2xk/ico-phone2x.png" width="20" height="21" alt="" border="0" style="vertical-align: middle;" /> {{storePhone}}
</p>
<p style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;margin:0 0 10px;">
<img src="https://i.postimg.cc/4xyBd44N/ico-pin2x.png" width="20" height="21" alt="" border="0" style="vertical-align: middle;" /> {{deliveryAddress}}
</p>
<p style="color:#000000;font-size:16px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;margin:20px 0 10px;letter-spacing: 1.6px;text-align: center;">
<img src="https://i.postimg.cc/8cv1dgm2/asterisco.png" width="395" height="5" alt="" border="0" style="vertical-align: middle;" />
</p>
<table align="center" border="0" cellpadding="0" cellspacing="0" id="templateContainer" style="-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: collapse !important;width:100%;">
{{#each items}}
<tr>
<td width="45%" style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 4px;">
x{{quantity}} {{name}}
</td>
<td width="35%" style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 4px;text-align:right;">
+{{price}} €
</td>
</tr>
{{#each modifiers}}
<tr>
<td style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 16px 14px;">
- {{quantity}} {{name}}
</td>
<td style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 16px;text-align:right;">
{{price}}
</td>
</tr>
{{/each}} {{/each}}
<tr>
<td colspan="3" style="border-bottom: 1px solid #000000;"> </td>
</tr>
<tr>
<td width="45%" style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 4px;">
</td>
<td width="35%" style="color:#000000;font-size:16px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:10px 0 4px;text-align:right;">
<strong>{{subTotal}} €</strong>
</td>
</tr>
<tr>
<td style="color:#000000;font-size:16px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:2px 0 10px">
Envío
</td>
<td style="color:#000000;font-size:16px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:2px 0 10px;text-align:right;">
+{{deliveryCharge}} €
</td>
</tr>
<tr>
<td style="color:#000000;font-size:20px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 16px">
<strong>TOTAL</strong>
</td>
<td style="color:#000000;font-size:20px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 16px;text-align:right;">
<strong>{{total}} €</strong>
</td>
</tr>
<tr>
<td style="color:#000000;font-size:12px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 24px">
<img src="https://i.postimg.cc/sDq36XNt/ico-card2x.png" width="22" height="17" alt="" border="0" style="vertical-align: middle;" /> {{tender}}
</td>
<td style="color:#000000;font-size:20px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;padding:0 0 24px;text-align:right;">
</td>
</tr>
</table>
</td>
I've seen some sites with SOF. find some solutions. none of them seems working. Let me know If I'm missing any additional CSS property for Outlook ?
For this it appears the only way to get it working for Outlook is to wrap it in a table.
<tr>
<td style="background:#fff;">
<h2 style="color:#000000;font-size:30px;line-height:22px;font-family:'Francois One',Arial,Sans-Serif;margin:30px 0 10px;font-weight: 400;">TU PEDIDO</h2>
<h3 style="color:#000000;font-size:20px;line-height:22px;font-family:'Francois One',Arial,Sans-Serif;margin:0 0 12px;font-weight: 400;">PEDIDO #{{orderNumber}}</h3>
</td>
</tr>
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="22">
<!--Use this to control space between icon and text-->
<p style="color:#000000;font-size:14px;line-height:21px;font-family:Helvetica,Arial,Sans-Serif;margin:0;">
<img src="https://i.postimg.cc/nzZ5SbZ8/ico-calendar2x.png" width="20" height="21" alt="" border="0" style="vertical-align: middle;" />
</p>
</td>
<td>
<!--No need to put width here. It will automatically size (and is responsive without a width) -->
<p style="color:#000000;font-size:14px;line-height:14px;font-family:Helvetica,Arial,Sans-Serif;margin:0;">{{orderDate}}
</p>
</td>
</tr>
<tr>
<td width="22">
<p style="color:#000000;font-size:14px;line-height:21px;font-family:Helvetica,Arial,Sans-Serif;margin:0;">
<img src="https://i.postimg.cc/nzZ5SbZ8/ico-calendar2x.png" width="20" height="21" alt="" border="0" style="vertical-align: middle;" />
</p>
</td>
<td>
<p style="color:#000000;font-size:14px;line-height:14px;font-family:Helvetica,Arial,Sans-Serif;margin:0;"><span style="color:#000000;font-size:14px;line-height:22px;font-family:Helvetica,Arial,Sans-Serif;margin:0;">{{storeName}}</span></p>
</td>
</tr>
</table>
</td>
</tr>
I've put in an extra <tr><td><table> so that when you use two columns, you don't have to use colspan, which can cause issues.
You can now also fine-tune spacing with padding on the <td> elements.
I'm trying to code a a mailing to my clients and i thought that i can insert a gif countdown clock (only the numbers) on top of an another image (i know i can do a gif with a custom background, but the message is too heavy then). Every e-mail client (web or desktop) respects the display:block and margins apart from GMAIL. It displays images one after another.
Is there a way to solve it? Pls help
The table code looks something like that:
<table align="center" width="652" bgcolor="#f5f5f5" cellpadding="0" cellspacing="0" border="0" style="background:#f5f5f5; border:none; margin-top: -95px;">
<tr width="650" height="95" cellpadding="0" cellspacing="0" border="0" style="">
<td width="134" height="95" cellpadding="0" cellspacing="0" border="0" style="border-left: 1px solid #afafaf;"colspan="3">
<a href="link" border="0" style="border:none;">
<img src="3.jpg" border="0" width="134" height="95" style="width:134px; height:95px; border:none; display:block;" alt="alt">
</a>
</td>
<td width="381" height="95" cellpadding="0" cellspacing="0" border="0" style=""colspan="3" bgcolor="#000">
<a href="link" border="0" style="border:none;">
<img src="4.jpg" border="0" width="381" height="95" style="width:381px; height:95px; border:none; display:block;" alt="">
</a>
</td>
<td width="135" height="95" cellpadding="0" cellspacing="0" border="0" style="border-right: 1px solid #afafaf;"colspan="3">
<a href="link" border="0" style="border:none;">
<img src="5.jpg" border="0" width="135" height="95" style="width:135px; height:95px; border:none; display:block;" alt="alt">
</a>
</td>
</tr>
</table>
And Gmail displays one image under another, and doesent respect minus margins.
It looks like this right now:
It looks like this right now
I just created a newsletter template in magento for one of my customer.
but the issue is it isn't showing the background header image in Hotmail Gmail Yahoo etc.
It is showing perfectly fine in test environment and in webmail but not in any Outlook etc.
Here is the code for you all.
Can you please tell me what I am doing wrong?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Newsletter</title>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center" valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="90" align="center" valign="top" style="background-image:url(http:placehold.it/350x150.jpg); background-repeat:no-repeat; background-position:center top;"><table width="600" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="300" height="90" align="left" valign="middle"><img src="http://www.mysite.co.uknewsletter/logo.png" width="177" height="48" alt=""/></td>
<td width="300" height="90" align="right" valign="middle"><img src="http://www.mysite.co.uknewsletter/contact-us.png" width="146" height="47" alt=""/></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td height="35" align="left" valign="top" style="background-image:url(http://www.mysite.co.uknewsletter/menu_bg.jpg); background-repeat:repeat-x; background-position:center top;">
Home
PC COMPONENTS
DESKTOP PC’S
LAPTOPS
MONITOR & TV’S
STORAGE
SALE
</td>
</tr>
<tr>
{{inlinecss file="email-inline.css"}}
<td align="center" valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
<table cellpadding="0" cellspacing="0" border="0">
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="email-heading">
<h1>Thank you for your order from {{var store.getFrontendName()}}.</h1>
<p>Once your package ships we will send an email with a link to track your order. Your order summary is below. Thank you again for your business.</p>
</td>
<td class="store-info">
<h4>Order Questions?</h4>
<p>
{{depend store_phone}}
<b>Call Us:</b>
{{var store_phone}}<br>
{{/depend}}
{{depend store_hours}}
<span class="no-link">{{var store_hours}}</span><br>
{{/depend}}
{{depend store_email}}
<b>Email:</b> {{var store_email}}
{{/depend}}
</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="order-details">
<h3>Your order <span class="no-link">#{{var order.increment_id}}</span></h3>
<p>Placed on {{var order.getCreatedAtFormated('long')}}</p>
</td>
</tr>
<tr class="order-information">
<td>
{{if order.getEmailCustomerNote()}}
<table cellspacing="0" cellpadding="0" class="message-container">
<tr>
<td>{{var order.getEmailCustomerNote()}}</td>
</tr>
</table>
{{/if}}
{{layout handle="sales_email_order_items" order=$order}}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="address-details">
<h6>Bill to:</h6>
<p><span class="no-link">{{var order.getBillingAddress().format('html')}}</span></p>
</td>
{{depend order.getIsNotVirtual()}}
<td class="address-details">
<h6>Ship to:</h6>
<p><span class="no-link">{{var order.getShippingAddress().format('html')}}</span></p>
</td>
{{/depend}}
</tr>
<tr>
{{depend order.getIsNotVirtual()}}
<td class="method-info">
<h6>Shipping method:</h6>
<p>{{var order.shipping_description}}</p>
</td>
{{/depend}}
<td class="method-info">
<h6>Payment method:</h6>
{{var payment_html}}
</td>
</tr>
</table>
</td>
</tr>
</table>
<tr>
<td height="20" align="center" valign="top"> </td>
</tr>
<tr>
<td height="56" align="center" valign="middle" bgcolor="#dcdcdc">
<img src="http://www.mysite.co.uknewsletter/brand-1.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-2.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-3.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-4.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-5.jpg" width="110" height="35" alt=""/></td>
</tr>
<tr>
<td height="75" align="center" valign="middle">
<img src="http://www.mysite.co.uknewsletter/facebook.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/twitter.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/gplus.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/pinterest.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/youtube.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/instagram.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/linkedin.jpg" width="31" height="31" alt=""/></td>
</tr>
<tr>
<td height="33" align="center" valign="middle" bgcolor="#1696da" style="color:#FFFFFF; font-family:arial; font-size:12px;">© Copyrights 2016 Smart Tech 786 Ltd, Registered Number 09713584.</td>
</tr>
<tr>
<td height="20" align="center" valign="top" style="line-height:40px; font-size:11px; font-family:arial;">
</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</body>
</html>
Email with html can be ... difficult, so use the old markup way
<td height="90" align="center" background="myback.gif">...</td>
Side note
You have a typo as well, which will fix the issue for email clients supporting newer css styles, where you forgot the 2 forward slashed in your url, so change http:placehold... to http://placehold...
style="background-image:url(http://placehold.it/350x150); ..."
If you still have issues with inline style, you might want to change the header background, where you remove it from the td and add it to the table, like this
<td height="90" align="center" valign="top">
<table width="600" border="0" cellspacing="0" cellpadding="0" background="http://placehold.it/350x150">
Try including a full url in the css
like this for example:
https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150&fm=jpg
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Newsletter</title>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center" valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="90" align="center" valign="top" style="background-image:url(https://placeholdit.imgix.net/~text?txtsize=33&txt=350%C3%97150&w=350&h=150&fm=jpg); background-repeat:no-repeat; background-position:center top;"><table width="600" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="300" height="90" align="left" valign="middle"><img src="http://www.mysite.co.uknewsletter/logo.png" width="177" height="48" alt=""/></td>
<td width="300" height="90" align="right" valign="middle"><img src="http://www.mysite.co.uknewsletter/contact-us.png" width="146" height="47" alt=""/></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td height="35" align="left" valign="top" style="background-image:url(http://www.mysite.co.uknewsletter/menu_bg.jpg); background-repeat:repeat-x; background-position:center top;">
Home
PC COMPONENTS
DESKTOP PC’S
LAPTOPS
MONITOR & TV’S
STORAGE
SALE
</td>
</tr>
<tr>
{{inlinecss file="email-inline.css"}}
<td align="center" valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
<table cellpadding="0" cellspacing="0" border="0">
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="email-heading">
<h1>Thank you for your order from {{var store.getFrontendName()}}.</h1>
<p>Once your package ships we will send an email with a link to track your order. Your order summary is below. Thank you again for your business.</p>
</td>
<td class="store-info">
<h4>Order Questions?</h4>
<p>
{{depend store_phone}}
<b>Call Us:</b>
{{var store_phone}}<br>
{{/depend}}
{{depend store_hours}}
<span class="no-link">{{var store_hours}}</span><br>
{{/depend}}
{{depend store_email}}
<b>Email:</b> {{var store_email}}
{{/depend}}
</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="order-details">
<h3>Your order <span class="no-link">#{{var order.increment_id}}</span></h3>
<p>Placed on {{var order.getCreatedAtFormated('long')}}</p>
</td>
</tr>
<tr class="order-information">
<td>
{{if order.getEmailCustomerNote()}}
<table cellspacing="0" cellpadding="0" class="message-container">
<tr>
<td>{{var order.getEmailCustomerNote()}}</td>
</tr>
</table>
{{/if}}
{{layout handle="sales_email_order_items" order=$order}}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="address-details">
<h6>Bill to:</h6>
<p><span class="no-link">{{var order.getBillingAddress().format('html')}}</span></p>
</td>
{{depend order.getIsNotVirtual()}}
<td class="address-details">
<h6>Ship to:</h6>
<p><span class="no-link">{{var order.getShippingAddress().format('html')}}</span></p>
</td>
{{/depend}}
</tr>
<tr>
{{depend order.getIsNotVirtual()}}
<td class="method-info">
<h6>Shipping method:</h6>
<p>{{var order.shipping_description}}</p>
</td>
{{/depend}}
<td class="method-info">
<h6>Payment method:</h6>
{{var payment_html}}
</td>
</tr>
</table>
</td>
</tr>
</table>
<tr>
<td height="20" align="center" valign="top"> </td>
</tr>
<tr>
<td height="56" align="center" valign="middle" bgcolor="#dcdcdc">
<img src="http://www.mysite.co.uknewsletter/brand-1.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-2.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-3.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-4.jpg" width="110" height="35" alt=""/>
<img src="http://www.mysite.co.uknewsletter/brand-5.jpg" width="110" height="35" alt=""/></td>
</tr>
<tr>
<td height="75" align="center" valign="middle">
<img src="http://www.mysite.co.uknewsletter/facebook.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/twitter.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/gplus.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/pinterest.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/youtube.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/instagram.jpg" width="31" height="31" alt=""/>
<img src="http://www.mysite.co.uknewsletter/linkedin.jpg" width="31" height="31" alt=""/></td>
</tr>
<tr>
<td height="33" align="center" valign="middle" bgcolor="#1696da" style="color:#FFFFFF; font-family:arial; font-size:12px;">© Copyrights 2016 Smart Tech 786 Ltd, Registered Number 09713584.</td>
</tr>
<tr>
<td height="20" align="center" valign="top" style="line-height:40px; font-size:11px; font-family:arial;">
</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
</body>
</html>
I have an email template I created but I can't seem to figure out what is stretching out the table, I've attached a screenshot for reference. Any help would be wonderful.
Here's the code for that part of the template:
<tr>
<td style="width:27px;height:53px;display:block;float:left;padding:0;margin:0;">
<img src="#" />
</td>
<td style="width:31px;height:53px;display:block;float:left;padding:0;margin:0;"> <img src="#" />
</td>
<td style="width:24px;height:53px;display:block;float:left;padding:0;margin:0;"> <img src="#" />
</td>
<td style="width:25px;height:53px;display:block;float:left;padding:0;margin:0;"> <img src="#" />
</td>
<td style="width:518px;height:53px;display:block;float:left;padding:0;margin:0;">
<img src="#" />
</td>
</tr>
<tr>
<td style="display:block;float:left;padding:0;margin:0;">
<img src="#" />
</td>
</tr>
Instead of float, use the html align="left" in your table cells. You don't need display:block; in the table cells, instead put it in your image tags.
Also, remove all the css width and height in your table cells and replace it with the html width="" and height=""
Also, if you put this in your table tag: border="0" cellpadding="0" cellspacing="0", you don't need the padding and margin in your table cell css.
Basic example of all combined:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="31" height="53" align="left">
<img alt="" src="" width="31" height="53" border="0" style="margin: 0; border: 0; padding: 0; display: block;">
</td>
</tr>
</table>
Note - align left is default, so it is not really needed.
I have this code on my print.css:
#header, #tae, #nav, .noprint {display: none;}
width: 100%; margin: 0; float: none;
In order not to display the elements within those div tags. But I don't know with the code below why it isn't cooperating. If I place the div tags on it. And then I hit the print button. I see no output.
Here it is:
<div id="tae">
<table border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
<tr>
<td class="text1" style="height: 50px;">xd627 information management system</td>
</tr>
<tr>
<td class="bg5"><table border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
<tr align="center">
<td>Homepage</td>
<td>Database</td>
<td>About</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="bg6"> </td>
</tr>
<tr>
<td><table width="780" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="20"> </td>
<td width="297"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/spacer.gif" alt="" width="30" height="30" /></td>
</tr>
</tr>
<tr>
<td class="text2">
</div>
<div id="max">
<?php
//some php code in here showing a mysql table.
?>
</div>
What's wrong with my code? Does the php script depend on the one where I put the div tag in?
What do I do? All I want to show up in my page when printed is the mysql table. I'm using
Universal Document Converter to simulate printing.
The HTML in that snippet is broken and the entire document is contained in #tae, thus nothing will print as everything is in a container that is display: none;
Here's a cleaned up version of that markup.
<div id="tae">
<table border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
<tr>
<td class="text1" style="height: 50px;">xd627 information management system</td>
</tr>
<tr>
<td class="bg5">
<table border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
<tr align="center">
<td>Homepage</td>
<td>Database</td>
<td>About</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" class="bg6"> </td>
</tr>
<tr>
<td>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="20"> </td>
<td width="297">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="images/spacer.gif" alt="" width="30" height="30" />
</td>
</tr>
<tr>
<td class="text2"></td>
</tr>
<!-- All this is missing, from here... -->
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- ...to here. -->
<div id="max">
<?php
//some php code in here showing a mysql table.
?>
</div>