Cleaning Emails collected from IMAP for insertion to a database - php

I'm in the process of creating a script for our internal customer support system. I want to collect emails from our IMAP inbox (hosted on Gmail) and parse the emails into the database.
What is the best way to clean frames, badly coded tags, and messy formatting so the result is a clean text with minimal formatting?
I'm aware Regular Expressions will most likely play heavily, but I want to know if this functionality exists in another library somewhere that I'm missing.
Edit: More specifically what needs removed:
All inline CSS/Styling, All HTML except simple formatting like Bold, Underline, and Italics.
Here's an email I'm using as a test case, It's a fairly beefy spam email I got from ZoneAlarm, It's got a bit of everything.
<td>
<br>
<br>
<table align="center" bgcolor="#749FD0" border="0" cellpadding="0" cellspacing="0" style="font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:16px;color:#555555" valign="top" width="700">
<tbody>
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" valign="top" width="680">
<tbody>
<tr>
<td height="10">
<img border="0" height="1" src="http://download.zonealarm.com/bin/images/email/socialguard/spacer.gif" style="display: block; max-width: 2880px;" width="1"></td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" valign="top" width="680">
<tbody>
<tr>
<td height="10" width="10">
<img border="0" height="10" src="http://www.zonealarm.com/email/campaigns/2013/2013_06_SummerSale/nw.png" style="display: block; max-width: 2880px;" width="10"></td>
<td bgcolor="#E3ECEC" height="10" width="660">
<img alt="ZoneAlarm by Check Point Software Technologies LTD." border="0" src="http://www.zonealarm.com/email/campaigns/2013/2013_05_MemorialDay/za_transparent.png" width="120" style="display: block; max-width: 2880px;" title="ZoneAlarm by Check Point Software Technologies LTD."></td>
<td align="right" style="font-family:Arial,Helvetica,sans-serif" width="150">
<span style="color:#999999;font-size:12px">Connect with ZoneAlarm</span></td>
<td align="right" valign="middle" width="125">
<img alt="ZoneAlarm Facebook" border="0" src="http://www.zonealarm.com/email/campaigns/2013/2013_05_MemorialDay/facebook.png" width="22" title="ZoneAlarm Facebook" style="max-width: 2880px;"> <img alt="ZoneAlarm Twitter" border="0" width="22" src="http://www.zonealarm.com/email/campaigns/2013/2013_05_MemorialDay/twitter.png" title="ZoneAlarm Twitter" style="max-width: 2880px;"> <img alt="ZoneAlarm YouTube" border="0" src="http://www.zonealarm.com/email/campaigns/2013/2013_05_MemorialDay/youtube.png" title="ZoneAlarm YouTube" height="22" style="max-width: 2880px;"><img border="0" height="15" src="http://download.zonealarm.com/bin/images/email/socialguard/spacer.gif" width="10" style="max-width: 2880px;"></td>
<td bgcolor="#E3ECEC" rowspan="6" align="center" valign="top" width="1">
<img align="right" height="32" src="http://download.zonealarm.com/bin/images/emails/welcome/borderx1.png" width="1" style="max-width: 2880px;">
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" valign="top" width="680">
<tbody>
<tr>
<td height="10" width="10">
<img border="0" height="10" src="http://www.zonealarm.com/email/campaigns/2013/2013_06_SummerSale/sw.png" style="display: block; max-width: 2880px;" width="10"></td>
<td bgcolor="#E3ECEC" height="10" width="660">

You can use HTML Purifier for this, see: http://htmlpurifier.org/

Related

Resize width and height of images

I have content stored in mysql, as following:
<table width="450" cellspacing="1" cellpadding="1" border="1">
<tbody>
<tr>
<td><img width="513" height="680" align="left" alt=" src="/userfiles/image/pic.jpg" /></td>
<td><img width="315" height="700" align="left" alt=" src="/userfiles/image/DSC_0389.JPG" /></td>
<td><img width="580" height="320" align="left" alt=" src="/userfiles/image/ktxh.jpg" /></td>
</tr>
</tbody>
</table>
When I load from db, PHP and display in html by PHP, there is no problem.
Now, I want all images, be displayed by fixed width and height as 200 X 200 AND TABLE BORDER = '0'
<table width="200" cellspacing="1" cellpadding="1" border="0">
<tbody>
<tr>
<td><img width="200" height="200" align="left" alt=" src="/userfiles/image/pic.jpg" /></td>
<td><img width="200" height="200" align="left" alt=" src="/userfiles/image/DSC_0389.JPG" /></td>
<td><img width="200" height="200" align="left" alt=" src="/userfiles/image/ktxh.jpg" /></td>
</tr>
</tbody>
</table>
How do I solve this problem?
Replace with this code and css
<style>
.cstm
{
width:200px;
height:200px
}
table
{
border:0
}
</style>
<table width="200" cellspacing="1" cellpadding="1" border="0">
<tbody>
<tr>
<td><img class="cstm" align="left" alt=" src="/userfiles/image/pic.jpg" /></td>
<td><img class="cstm" align="left" alt=" src="/userfiles/image/DSC_0389.JPG" /></td>
<td><img class="cstm" align="left" alt=" src="/userfiles/image/ktxh.jpg" /></td>
</tr>
</tbody>
</table>
As you mention the $content is dynamic, can you try adding the style to the table as such:
<style>
table td>img
{
width:200px;
height:200px
}
</style>

HTML Purifier for webmail

I'm working on small webmail client. For safely embedding html I want to use HTML Purifier (BTW: it's a good idea?).
I checked it with several emails and some problems. One email (from Google) is having something like this:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="4%">
<td width="92%" style="padding-top:18px; padding-bottom:10px; opacity:0.7">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<td width="30%">
<img style="display:inline-block;" height="26" src="https://www.gstatic.com/local/guides/email/images/photo-impact/googlelogo_light_clr-f040d5d9.png">
<td>
<td width="70%" style="text-align:right">
</td>
</tbody>
</table>
Converts to:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="4%">
</td><td width="92%" style="padding-top:18px;padding-bottom:10px;opacity:.7;">
</td><td width="30%">
<img style="display:inline-block;" height="26" src="https://www.gstatic.com/local/guides/email/images/photo-impact/googlelogo_light_clr-f040d5d9.png" alt="googlelogo_light_clr-f040d5d9.png">
</td><td>
</td><td width="70%" style="text-align:right;">
</td>
</tr></table>
I don't know why it remove second <table> tag (also it close wrong <td> and removes <tbody>). Is it possible to change HTML Purifier to make it work for those situations?

PHP - How to handle 'utf-16', us-ascii encoded html string to save correctly in DomDocument?

I am working on a PHP project which fetches emails and displays them on the screen. In an email it fetches the following html :
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-16">
<style type="text/css">
TD {
font-family: Verdana,Tahoma,Arial, "Sans Serif";
font-size: 10pt;
}
BODY {
font-family: Verdana,Tahoma,Arial, "Sans Serif";
font-size: 10pt;
}
</style>
</head>
<body bgcolor="#eeeeee"><img width="1" height="1" alt="" src="https://trademe.tmcdn.co.nz/images/1pixel.gif?gen=20181128"><table cellspacing="0" cellpadding="0" width="700" bgcolor="white" align="center" style="border-left: 1px #CCCCCC solid; border-right: 1px #CCCCCC solid; border-top: 1px #CCCCCC solid;">
<tr>
<td height="20" colspan="4"> </td>
</tr>
<tr>
<td width="20"></td>
<td><img border="0" alt="Trade Me Logo" width="246" height="48" src="https://trademe.tmcdn.co.nz/images/new-brand-2016/common/tm-logo-2016-246x48-v1.gif?gen=2018112820201"><img src="https://api.trademe.co.nz/tracking/collect?evt=open&tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937&tid=EB71C99D-BEB4-445F-B62B-C172AC5A4CF4"></td>
<td align="center"></td>
<td width="20"></td>
</tr>
<tr>
<td width="20"></td>
<td colspan="2">
<hr size="0" color="#CCCCCC">
<center><small>Security Note: Trade Me will never ask you for your password via email</small></center>
<hr size="0" color="#CCCCCC">
</td>
<td width="20"></td>
</tr>
<tr>
<td width="20"></td>
<td colspan="2" style="padding-left: 10px; padding-top: 10px;"><small>
This is an automated email regarding listing #: 1847238571</small><br><br>
Hi Matthew,
<br><br><div>
A member has asked a question on your listing for "2.4KW 2400W 3KVA 24VDC Pure Sine Wave Power Inverter Solar Caravan Off Grid LCD".
</div><br><table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td align="center" width="20"><img width="20" height="20" alt="" src="https://trademe.tmcdn.co.nz/images/icon_question.gif"> </td>
<td>what is the warranty like? <small><i>posted by: </i></small> <b>matihegarty</b>
(5 <img align="absmiddle" border="0" src="https://www.trademe.co.nz/images/star.gif">)
<small>8:54 pm, Wed 28 Nov</small></td>
</tr>
</table><br><br><center><b><font size="3">Answer this question</font></b></center><br><br><div>
We recommend you answer all questions on your listings to help buyers make informed decisions. Questions on vehicle listings created in Trade Me Motors will be displayed automatically. For other listings, questions will only be displayed if answered.
</div><br><br>
Happy trading!
<br><br>
The Trade Me team
<br>www.trademe.co.nz<br><br><small>
If you don't wish to receive these emails or prefer plain text email, please update your
email options</small></td>
<td width="20"></td>
</tr>
<tr>
<td colspan="3">
<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center" style="background-color:White;">
<tr>
<td align="center"><br><small><img width="7" height="8" src="https://trademe.tmcdn.co.nz/images/3/common/triangle.gif"> <font color="#666666">advertisement</font></small><br><br></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" width="100%" align="center" style="background-color:#9A9A9A;">
<tr>
<td><img style="border-width:0;" src="https://trademe.tmcdn.co.nz/photoserver/adserver/TMI0003-700x70-mates-FA.png?e=" alt="" width="700" height="70"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
My program does this :
$cleanMessage = new DOMDocument();
#$cleanMessage->loadHTML($this->bodyHTML); //To clean the html code for unclosed td table tags and other
$this->message = $cleanMessage->saveHTML();
But my output is :
��<�!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd"> <�html><�head><�meta
http-equiv="Content-Type" content="text/html; charset=utf-16"><�style
type="text/css"> TD { font-family: Verdana,Tahoma,Arial, "Sans Serif";
font-size: 10pt; } BODY { font-family: Verdana,Tahoma,Arial, "Sans
Serif"; font-size: 10pt; } <�/style><�/head><�body
bgcolor="#eeeeee"><�img width="1" height="1" alt=""
src="https://trademe.tmcdn.co.nz/images/1pixel.gif?gen=20181128"><�table
cellspacing="0" cellpadding="0" width="700" bgcolor="white"
align="center" style="border-left: 1px #CCCCCC solid; border-right:
1px #CCCCCC solid; border-top: 1px #CCCCCC solid;"><�tr><�td
height="20" colspan="4">�<�/td> <�/tr><�tr><�td width="20"><�/td>
<�td><�a
href="https://www.trademe.co.nz/Track.aspx?site=2018112820201&tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937"
style="text-decoration: underline;"><�img border="0" alt="Trade Me
Logo" width="246" height="48"
src="https://trademe.tmcdn.co.nz/images/new-brand-2016/common/tm-logo-2016-246x48-v1.gif?gen=2018112820201"><�/a><�img
src="https://api.trademe.co.nz/tracking/collect?evt=open&tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937&tid=EB71C99D-BEB4-445F-B62B-C172AC5A4CF4"><�/td>
<�td align="center"><�/td> <�td width="20"><�/td> <�/tr><�tr><�td
width="20"><�/td> <�td colspan="2"> <�hr size="0"
color="#CCCCCC"><�center><�small>Security Note: Trade Me will never
ask you for your password via email<�/small><�/center> <�hr size="0"
color="#CCCCCC"><�/td> <�td width="20"><�/td> <�/tr><�tr><�td
width="20"><�/td> <�td colspan="2" style="padding-left: 10px;
padding-top: 10px;"><�small> This is an automated email regarding
listing #: 1847238571<�/small><�br><�br> Hi Matthew, <�br><�br><�div>
A member has asked a question on your listing for "2.4KW 2400W 3KVA
24VDC Pure Sine Wave Power Inverter Solar Caravan Off Grid LCD".
<�/div><�br><�table width="100%" cellpadding="3" cellspacing="0"
border="0"><�tr><�td align="center" width="20"><�img width="20"
height="20" alt=""
src="https://trademe.tmcdn.co.nz/images/icon_question.gif">�<�/td>
<�td>what is the warranty like? ��<�small><�i>posted
by:�<�/i><�/small>�<�b><�a
href="https://www.trademe.co.nz/Members/Listings.aspx?member=4187691&tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937"
style="text-decoration: underline;">matihegarty<�/a><�/b> (<�a
href="https://www.trademe.co.nz/Members/Feedback.aspx?member=4187691&tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937"
style="text-decoration: underline;">5<�/a>�<�a
href="https://www.trademe.co.nz/Members/Feedback.aspx?member=4187691&tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937"><�img
align="absmiddle" border="0"
src="https://www.trademe.co.nz/images/star.gif"><�/a>) ���<�small>8:54
pm, Wed 28 Nov<�/small><�/td>
<�/tr><�/table><�br><�br><�center><�b><�font size="3"><�a
href="https://www.trademe.co.nz/a.asp?id=1847238571&qna=true#qna&tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937"
style="text-decoration: underline;">Answer this
question<�/a><�/font><�/b><�/center><�br><�br><�div> We recommend you
answer all questions on your listings to help buyers make informed
decisions. Questions on vehicle listings created in Trade Me Motors
will be displayed automatically. For other listings, questions will
only be displayed if answered. <�/div><�br><�br> Happy trading!
<�br><�br> The Trade Me team <�br><�a
href="https://www.trademe.co.nz/?tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937"
style="text-decoration:
underline;">www.trademe.co.nz<�/a><�br><�br><�small> If you don't wish
to receive these emails or prefer plain text email, please update your
<�a
href="https://www.trademe.co.nz/MyTradeMe/EmailOptions.aspx?tm=email&et=201&mt=75D6A1C7-4DEA-4B06-A3E9-6A12C1B41937"
style="text-decoration: underline;">email options<�/a><�/small><�/td>
<�td width="20"><�/td> <�/tr><�tr><�td colspan="3"> <�table
cellspacing="0" cellpadding="0" border="0" width="100%" align="center"
style="background-color:White;"><�tr><�td
align="center"><�br><�small><�img width="7" height="8"
src="https://trademe.tmcdn.co.nz/images/3/common/triangle.gif">�<�font
color="#666666">advertisement<�/font><�/small><�br><�br><�/td>
<�/tr><�/table><�table cellspacing="0" cellpadding="0" border="0"
width="100%" align="center"
style="background-color:#9A9A9A;"><�tr><�td><�a
href="https://www.trademe.co.nz/Link.aspx?i=101247"><�img
style="border-width:0;"
src="https://trademe.tmcdn.co.nz/photoserver/adserver/TMI0003-700x70-mates-FA.png?e="
alt="" width="700" height="70"><�/a><�/td> <�/tr><�/table><�/td>
<�/tr><�/table><�/body><�/html>
I tried :
1.
$this->bodyHTML = mb_convert_encoding($this->bodyHTML,'UTF-8','utf-16');
$this->bodyHTML = mb_convert_encoding($this->bodyHTML,'HTML-ENTITIES','UTF-8'); //both lines together
$this->bodyHTML = mb_convert_encoding($this->bodyHTML,'HTML-ENTITIES','UTF-16');
But it still displays garbled or chinese type characters.
What is the right way to display this html correctly?
in your html replace charsetutf-16 with utf-8 or ISO-8859-1 if you see strange characters.
$this->bodyHTML = str_replace("charset=utf-16","charset=utf-8", $this->bodyHTML);

Regex to read Table Rows contents in Array - PHP

Is there any Regex to Read the <td> contents from the following Table, note that there are many similar tables so i want only to read the following table contents.
I want to READ data from 3,4,5 TD from all <TR>
My regex looks like following but doesnt work
$match = preg_replace('~<td width="80" bgcolor="#F3F3E4" align="left"> <a onmouseout="ChangeImage(AE1,1)" onmouseover="ChangeImage(AE1,0)" href="/charts/livegold.html">GOLD</a></td>#[a-z0-9]{6}~i','',$match[3]);
echo '<table><tr>' . $match . '</tr></table>';
the table is as follows
<table width="540" cellspacing="1" cellpadding="0" border="0" align="center">
<tbody><tr>
<td width="16" bgcolor="#000000" align="center"> </td>
<td width="80" bgcolor="#000000" align="center"><font size="1" face="Arial, Helvetica, sans-serif" color="#FFFFFF">www.kitco.com</font></td>
<td width="369" bgcolor="#000000" align="center" colspan="5"><p class="white">The World Spot Price - Asia/Europe/NY markets</p></td>
<td width="73" bgcolor="#000000" align="right"><img width="39" vspace="0" hspace="0" height="17" border="0" alt="light" src="/images/lightgreen.gif"></td>
</tr>
<tr>
<td width="16" bgcolor="#000000" align="center"> </td>
<td width="522" bgcolor="#F3F3E4" align="center" colspan="7"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><font color="GREEN">MARKET IS OPEN</font><br>(Will close in 17 hrs. 41 mins.)<!-- 1486.00--></b></font></td>
</tr>
<tr bgcolor="#F3F3E4">
<td width="16" bgcolor="#000000" align="center"> </td>
<td width="80" bgcolor="#CCCC99" align="center">Metals</td>
<td width="80" bgcolor="#CCCC99" align="center">Date</td>
<td width="80" bgcolor="#CCCC99" align="center">Time (EST)</td>
<td width="68" bgcolor="#CCCC99" align="center">Bid</td>
<td width="68" bgcolor="#CCCC99" align="center">Ask</td>
<td width="146" bgcolor="#CCCC99" align="center" colspan="2">Change from NY Close</td>
</tr>
<tr bgcolor="#F3F3E4">
<td width="16" bgcolor="#000000" align="center"><a onmouseout="ChangeImage('AE1','1')" onmouseover="ChangeImage('AE1','0')" href="/charts/livegold.html"><img width="16" vspace="0" hspace="0" height="13" border="0" alt="Gold Charts" name="AE1" src="http://www.kitco.com/images/graph_down.gif"></a></td>
<td width="80" bgcolor="#F3F3E4" align="left"> <a onmouseout="ChangeImage('AE1','1')" onmouseover="ChangeImage('AE1','0')" href="/charts/livegold.html">GOLD</a></td>
<td width="80" align="center">06/04/2013</td>
<td width="80" align="center">23:34</td>
<td width="68" align="center">1405.50</td>
<td width="68" align="center">1406.50</td>
<td width="73" align="center"><p class="spotgreen">+5.50</p></td>
<td width="73" align="center"><p class="spotgreen">+0.39%</p></td>
</tr>
<tr bgcolor="#F3F3E4">
<td width="16" bgcolor="#000000" align="center"><a onmouseout="ChangeImage('AE2','1')" onmouseover="ChangeImage('AE2','0')" href="/charts/livesilver.html"><img width="16" vspace="0" hspace="0" height="13" border="0" alt="Silver Charts" name="AE2" src="http://www.kitco.com/images/graph_down.gif"></a></td>
<td width="80" align="left"> <a onmouseout="ChangeImage('AE2','1')" onmouseover="ChangeImage('AE2','0')" href="/charts/livesilver.html">SILVER</a></td>
<td width="80" align="center">06/04/2013</td>
<td width="80" align="center">23:34</td>
<td width="68" align="center">22.59</td>
<td width="68" align="center">22.69</td>
<td width="73" align="center"><p class="spotgreen">+0.05</p></td>
<td width="73" align="center"><p class="spotgreen">+0.20%</p></td>
</tr>
<tr bgcolor="#F3F3E4">
<td width="16" bgcolor="#000000" align="center"><a onmouseout="ChangeImage('AE3','1')" onmouseover="ChangeImage('AE3','0')" href="/charts/liveplatinum.html"><img width="16" vspace="0" hspace="0" height="13" border="0" alt="Platinum Charts" name="AE3" src="http://www.kitco.com/images/graph_down.gif"></a></td>
<td width="80" align="left"><p> <a onmouseout="ChangeImage('AE3','1')" onmouseover="ChangeImage('AE3','0')" href="/charts/liveplatinum.html">PLATINUM</a></p></td>
<td width="80" align="center">06/04/2013</td>
<td width="80" align="center">23:34</td>
<td width="68" align="center">1501.00</td>
<td width="68" align="center">1509.00</td>
<td width="73" align="center"><p class="spotgreen">+9.00</p></td>
<td width="73" align="center"><p class="spotgreen">+0.60%</p></td>
</tr>
<tr bgcolor="#F3F3E4">
<td width="16" bgcolor="#000000" align="center"><a onmouseout="ChangeImage('AE4','1')" onmouseover="ChangeImage('AE4','0')" href="/charts/livepalladium.html"><img width="16" vspace="0" hspace="0" height="13" border="0" alt="Palladium Charts" name="AE4" src="http://www.kitco.com/images/graph_down.gif"></a></td>
<td width="80" align="left"> <a onmouseout="ChangeImage('AE4','1')" onmouseover="ChangeImage('AE4','0')" href="/charts/livepalladium.html">PALLADIUM</a></td>
<td width="80" align="center">06/04/2013</td>
<td width="80" align="center">23:25</td>
<td width="68" align="center">755.00</td>
<td width="68" align="center">761.00</td>
<td width="73" align="center"><p class="spotgreen">+6.00</p></td>
<td width="73" align="center"><p class="spotgreen">+0.80%</p></td>
</tr>
</tbody></table>
Here is the data i want to Extract
ok here is the solution with Regex:
$patt = "/<td[^>]*width=['\"]68['\"][^>]*>([0-9\.]+)<\/td>\s*<td[^>]*width=['\"]68['\"][^>]*>([0-9\.]+)<\/td>/i";
if(preg_match_all($patt, $html, $matches))
{
//print all records
//print_r($matches);
for($i=0; $i<count($matches[1]); $i++)
{
echo "Bid: ".$matches[1][$i].", Ask: ".$matches[2][$i]."\n";
}
}
You can use some HTML parser. For PHP there is one http://simplehtmldom.sourceforge.net/
Once the DOM has been loaded into library, get through the TABLE element and iterate through each TR element.

Navigation table not aligning properly in Chrome

On one of my old sites, which has a pretty messy and outdated code, I am having problems with navigation menu in Chrome. It aligns perfectly in Firefox and IE but for some reason in Chrome only first 3 tabs get properly centered.
http://jsfiddle.net/8b2Cm/1/
<table width="765" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="19%"><img src="http://LINK" alt="" width="331" height="95" border="0"></td>
<td width="81%"><img src="http://LINK/images/logo.jpg" alt="" width="434" height="95"></td>
</tr>
</table>
</td>
<td valign="top" class="back1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="1%"><img src="http://LINK/images/left-top.jpg" width="23" height="30" alt=""></td>
<td width="98%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" class="left-text11"><div align="center"> Home</div></td>
<td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" class="left-text11"><div align="center" class="left-text11">
<? if(!$_SESSION['sbprj_userid'])
{
?><strong>Signup</strong>
<?
}else
{
?>My Account
<?
}
?></div></td>
<td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="90%" class="left-text11"><div align="center">Free Poker Money </div></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" width="90%" class="left-text11"><div align="center">Poker School</div></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>
</tr>
</table></td>
<td class="left-text11"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" class="left-text11"><div align="center">News </div></td>
<td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>
</tr>
</table></td>
<td class="left-text11"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" class="left-text11"><div align="center">Support </div></td>
<td width="10%"><img src="http://LINK/images/line1.jpg" width="8" height="30" alt=""></td>
</tr>
</table></td>
<td class="left-text11"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="90%" class="left-text11"><div align="center"><img src="http://LINK/images/facebook.png" border="0" width="28" height="25" /> <img src="http://LINK/images/twitter.png" border="0" width="28" height="25" /> <img src="http://LINK/images/googleplus.png" border="0" width="28" height="25" /></div></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="1%"><img src="http://LINK/images/right-top.jpg" width="24" height="30" alt=""></td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="1%"><img src="http://LINK/images/top-1.jpg" width="23" height="17" alt=""></td>
<td width="98%" class="back2"><img src="http://LINK/images/back2.jpg" width="9" height="17" alt=""></td>
<td width="1%"><img src="http://LINK/images/right-1.jpg" width="24" height="17" alt=""></td>
</tr>
</table></td>
This is the code, any suggestions on how to fix this ?
There is a mess with separators.
Some separators are inside table(horizontal table with tabs, by the way, you should put only that table into fiddle and code, not whole the mess making for us harder to understand) cells, other separators come all alone in separate column, therefore they are taking the same place as column. Check it and move them, like it's done in first two tabs

Categories