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
https://forums.phpfreaks.com/topic/150438-row-and-columns-problem-in-gmail/
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;
} 
}
?>

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;'>

 

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;
} 
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.