Jump to content
Fórum Script Brasil
  • 0

Alinhar banner a direita da tabela


karlosrapanui

Question

Boa tarde a todos

Deem uma olhada na imagem

imagem.jpg

O banner onde esta escrito CASAE tem que ficar alinhado com a primeira paginação. Ele esta alinhando com a de baixo.

<table width="100%" align="center" cellpadding="4" cellspacing="3" >
            <? $j=0; $linha=0;
             while ($j < $i) {
                                $descricao = substr($obsa[$j],0,50);
                                $novaUrlGerar = geraUrl("{$nome[$j]}-{$cidadea[$j]}");
                                $novaUrl = "{$dir2}/{$novaUrlGerar}_{$id[$j]}.html";
                         ?>
            
            <tr valign="top"><td valign="top"><table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="bannerHolder1" style="background-color:#F6F7F9; border: 1px solid #E5E5E5">
              
              <tr valign="top">
                
                <td width="15%" valign="middle"><a href="<?=$novaUrl?>" class=\"bmenu\"><img src="imoveis/<? echo $foto[$j] ?>" width="200" height="110" border="0"  /></a></td>
        
                              <td width="42%" align="left" valign="top"><a href="<?=$novaUrl?>" class=\"bmenu\"><font style="font-size:30px; font-family:Tahoma, Geneva, sans-serif;">
                                  <? echo htmlentities($nome[$j]); ?></font><br />
                              <? echo htmlentities(substr($obsa[$j],0,300)); ?></a><br />
                                <br /><br /><br />
                                
                                <div style="font-size:14px"><a href="<?=$novaUrl?>" class=\"bmenu\"><? echo $cidadea[$j]; ?></a></div></td>
        
                              <td width="43%" align="center" valign="middle"><div style="color:#900; font-family:Tahoma, Geneva, sans-serif; font-size:26px;">
                                <div align="right">
                                  <? if ($vvenda[$j] != "0.00") { ?>
                                  R$ <? echo number_format($vvenda[$j],2,",",".");  ?>
                                  <? } else { ?>
                                  Confira
                                  <? } ?>
                                  <br />
                                  </div>
                                      </div><div style="color:#000; font-family:Tahoma, Geneva, sans-serif; font-size:18px;">
                                        <div align="right">
                                          <?



                                  $txt = "select * from empresas where cnpj='$codimb[$j]'";

                                  //echo $txt;

                                  $sql = mysql_query($txt);



                                  if(mysql_num_rows($sql) > 0) {



                                  $dados = mysql_fetch_array($sql);

                                  //echo mysql_error();

                                  echo htmlentities($dados["imobiliaria"]);

                                  echo "<BR>";

                                  echo $dados["telefone"];

                                  } else {

                                  }
                                  ?>
                                          </div>
                                      </div></td>
                                  </tr>
              </table>
              <?
               echo "</b></a>";
               $linha++;
                           $j++;
                   }
                  ?>
            </td>
     <td width="178" valign="top">
    <p align="center">
            [i] [b] <?
                while ($row = mysql_fetch_array($rsExibirBannerServicos, MYSQL_ASSOC)) {
                   $localBanner = "adm-5CEB03C2-7C9F-44F9-8D44-4B7B9B63DEB2/".$row['banner'];
                   $linkBanner  = 'http://'.$row["link"];
                   echo "<a href='$linkBanner' target='_blank' rel='lightbox[roadtrip]'>";
                   echo "<img src=$localBanner align=top width=170 height=400 class=img onmouseover=this.style.opacity=1;this.filters.alpha.opacity=100
                         onmouseout=this.style.opacity=0.4;this.filters.alpha.opacity=40/></a>";
                   echo "<p>";
                }
                          ?>[/b][/i]
    </p></td>
      </tr>
              </table>
          <?
                 } else  { ?>
              <strong>A pesquisa não retornou nenhum resultado !</strong>
              <? }

                   }



          }



            ?>

Código do banner

<?

while ($row = mysql_fetch_array($rsExibirBannerServicos, MYSQL_ASSOC)) {

$localBanner = "adm-5CEB03C2-7C9F-44F9-8D44-4B7B9B63DEB2/".$row['banner'];

$linkBanner = 'http://'.$row["link"];

echo "<a href='$linkBanner' target='_blank' rel='lightbox[roadtrip]'>";

echo "<img src=$localBanner align=top width=170 height=400 class=img onmouseover=this.style.opacity=1;this.filters.alpha.opacity=100

onmouseout=this.style.opacity=0.4;this.filters.alpha.opacity=40/></a>";

echo "<p>";

}

?>

alguém tem uma luz de porque isso ta ocorrendo

[]'s

Carlos

Edited by karlosrapanui
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Karlos,

esse código seu está meio poluido com <table> dentro de outra <table> o negócio é arrumar isso no proprio CSS.

seria algo como +/- assim, nos produtos teria uma DIV = Produtos e na lateral uma DIV = Publicidade, ambas em FLOAT = LEFT, tipo

#divProdutos {

float: left;

}

#divProdutos .box {

border:1px solid #ccc;

background: #f2f2f2;

}

#divPublicidade {

float: left;

}

#divPublicidade .box {

border:none

}

depois chamar

<div id=Produtos>

<div class=box>

meus produtos aqui

</div>

</div>

<div id=divPublicidade>

<div class=box>

</div>

meus banners

</div>

e um <div style=clear:both> </div> para tirar as flutuações

Abs.

Link to comment
Share on other sites

  • 0

Ricardo, obrigado pela resposta.

O porem é que não fui eu quem fiz essa paginação, fiz somente a inserção do banner, e o cliente quer que seja feito dessa maneira (NÃO SEI ONDE O CARA LEU, MAS NÃO QUER QUE SEJA USADA DIV).

Então, vou ter que descobrir uma maneira de consertar isso.

O problema parece estar aqui

<?

echo "</b></a>";

$linha++;

$j++;

}

?>

Link to comment
Share on other sites

  • 0

</div>
                                      </div></td> //fecha TD
                                  </tr> //fecha Linha
              </table> //FEcha tabela
              <?
               echo "</b></a>";
               $linha++;
                           $j++;
                   }
                  ?>
            </td> //fecha TD, kd o abre TR e TD para esta tag?

PAssa o link do site ai pra vermos o codigo-fonte

Edited by Ricardo T. do Prado
Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...