Jump to content

row and columns problem in gmail


vinpkl

Recommended Posts

hi all

 

i have html emailer which displays perfect in yahoo, hotmail, rediff.

 

but i dont know what is happening in gmail. after 4th product, the rows and columns get distort.

 

i have attached screen shots of yahoo and gmail to make my problem more clear.

 

vineet

 

$body="
<html>
<head>
<link rel='stylesheet' type='text/css' href='http://domain/includes/stylese.css' />
</head>
<body>
<table width='700' border='0'  align='center' cellspacing='0' cellpadding='0' style='border:4px solid #A1B22D'>
<tr>
<td bgcolor='#FFFEBE'>";
     
$columns_counter=0; 
$body .= "<table>";
$body .= "<tr>"; 
while($row_p = mysql_fetch_array($result_p))
{
$body .= "<td width=140 align=center height=137>" ."<img style='border:2px solid #a2a2a2' alt='mobile phones' src='http://domain/graphics/thumbs/" . $row_p['prod_thumb'] . "'/></td>
<td width='235'>".$row_p['product_name'] ."</td>";

$columns_counter++; 
if($columns_counter==2){
$body .= "</tr>"; 
$columns_counter=0;
} 
}
$body .=  "</table>
</td>
</tr>
</table>
</body>
</html>";

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

I think the way you're generating the table rows is incorrect.

 

Try this:

 

<?php
$columns_counter=0; 
$body .= "<table>";
while($row_p = mysql_fetch_array($result_p))
{
if ($columns_counter == 0) {
   $body .= "<tr>"; 
}
$body .= "<td width=140 align=center height=137>" ."<img style='border:2px solid #a2a2a2' alt='mobile phones' src='http://domain/graphics/thumbs/" . $row_p['prod_thumb'] . "'/></td>
<td width='235'>".$row_p['product_name'] ."</td>";

$columns_counter++; 
if($columns_counter==2){
$body .= "</tr>"; 
$columns_counter=0;
} 
}
?>

Link to comment
Share on other sites

that html is perfect mate

 

can i see the code that email this code please.

 

can i have a link to that code as well please.

 

are you adding the message=$body and sending it as it is.

height not legal in html use css.

 

<td STYLE='width: 140;  align: center; height: 137;'>

 

Link to comment
Share on other sites

hi AP81

 

Thanks a lot. This works perfect.

 

vineet

 

I think the way you're generating the table rows is incorrect.

 

Try this:

 

<?php
$columns_counter=0; 
$body .= "<table>";
while($row_p = mysql_fetch_array($result_p))
{
if ($columns_counter == 0) {
   $body .= "<tr>"; 
}
$body .= "<td width=140 align=center height=137>" ."<img style='border:2px solid #a2a2a2' alt='mobile phones' src='http://domain/graphics/thumbs/" . $row_p['prod_thumb'] . "'/></td>
<td width='235'>".$row_p['product_name'] ."</td>";

$columns_counter++; 
if($columns_counter==2){
$body .= "</tr>"; 
$columns_counter=0;
} 
}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.