Problema con visualización de tabla
Publicado por Pablo (11 intervenciones) el 05/10/2011 22:10:46
Hola a todos! Escribo porque tengo un problemita que no puedo dar con la solución. Tengo una página de clásificados y deseo que en el index se muestren los últimos 9 avisos publicados. Hasta ahí todo bien, pero me encuentro con el problema que no puedo centrar esos anuncios, ya que deseo que se visualicen en 3 filas de 3 columnas, pero solo puedo hacer que se vea bien la primera fila, ya que los avisos restantes los incluye en la segunda linea, sin saltar a la tercera.
El código de la parte especifica con el problema es el siguiente:
Desde ya agradezco cualquier ayuda que puedan brindarme
El código de la parte especifica con el problema es el siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if($lrows > '0')
{
$ListingTable .= "<table width=\"100%\" cellspacing=0>\n";
$ListingTable .= "<tr>\n\t";
$iter = "";
$i=0;
while($a1 = mysql_fetch_array($r1))
{
if ($i == '3'){$ListingTable .= "</tr><tr>\n\t";}
$i++;
$ListingTable .= "<td height=60 width=\"270\" valign=top>";
$iter++;
$ListingTable .= "<table width=\"100%\" height=\"250\" style=\"";
if ($iter == 2) $ListingTable .= "border-left: 2px dotted #666;";
if ($iter == 3) $ListingTable .= "border-left: 2px dotted #666;";
if ($iter == 4) $ListingTable .= "border-top: 2px dotted #666;";
if ($iter == 5) $ListingTable .= "border-left: 2px dotted #666; border-top: 2px dotted #666;";
if ($iter == 6) $ListingTable .= "border-left: 2px dotted #666; border-top: 2px dotted #666;";
if ($iter == 7) $ListingTable .= "border-top: 2px dotted #666;";
if ($iter == 8) $ListingTable .= "border-left: 2px dotted #666; border-top: 2px dotted #666;";
if ($iter == 9) $ListingTable .= "border-left: 2px dotted #666; border-top: 2px dotted #666;";
$ListingTable .= "\">\n";
Desde ya agradezco cualquier ayuda que puedan brindarme

Valora esta pregunta


0