
Exibir De Dois Em Dois Na Página
#1
Posted 26/08/2006, 10:32
Eu uso um script php para:
Ele seleciona no banco de dados as imagens que eu quero e mostra na página assim:
Imagem
Imagem
Imagem
Imagem
No caso eu queria que focem exibidos assim:
Imagem Imagem
Imagem Imagem
De duas em duas entende?!!
Se não deu pra entender me diz q tento denovo!
#2
Posted 26/08/2006, 11:30
tópicos e até tutoriais ( um feito por BALALA ) é o que não falta!
T+
PALMEIRAS - Primeiro campeão do mundo em 1951
#3
Posted 27/08/2006, 20:09

<head>
<style type="text/css">
*, html, body {
border: 0;
margin: 0;
padding: 0;
}
/* Regras de estilo da galeria
----------------------------------------------------------------------*/
a {text-decoration: none;}
.hoverbox {
position: absolute;
/*left:20%;
top:5%;*/
background: #ccc;
color: #333;
width: 372px;
text-align:center;
vertical-align:middle;
}
.hoverbox {
cursor: default;
list-style: none;
text-align:center;
}
.hoverbox a { cursor: default;}
.hoverbox a .preview { display: none;}
.hoverbox a:hover .preview {
display: block;
position: absolute;
top: -33px;
left: -45px;
z-index: 1;
}
.hoverbox img {
background: #fff;
border-color: #aaa #ccc #ddd #bbb;
border-style: solid;
border-width: 1px;
color: inherit;
padding: 2px;
vertical-align: top;
width: 100px;
height: 75px;
}
.hoverbox li {
position: relative;
background: #eee;
border-color: #ddd #bbb #aaa #ccc;
border-style: solid;
border-width: 1px;
color: inherit;
display: inline;
float: left;
margin: 3px;
padding: 5px;
}
.hoverbox .preview {
border-color: #000;
width: 200px;
height: 150px;
}
/* Hacks para o Internet Explorer
----------------------------------------------------------------------*/
* html .hoverbox a { position: relative;}
* html .hoverbox a:hover { font-size: 99.99%; z-index: 1;}
* html .hoverbox a:hover .preview { top: -38px; left: -50px;}
* html .hoverbox li { position: static;}
</style>
</head>
<body class="hoverbox">
<?php
.... código php
?>
</body>
</html>
#4
Posted 27/08/2006, 21:11
...
$sql = ...
$cols = 2; //numero de colunas, no caso 2
$c = 1; // não mecha
while($l = mysql_fetch_array($sql)) {
...
if($c==1) echo "<tr>";
echo "<td>...</td>";
if($c==$cols) { echo "</tr>"; $c = 0; }
$c++;
}
...
Modifique ao seu gosto e tente aí amigo, qualquer dúvida é só falar...

SETA HOST - www.setahost.com - Planos a partir de R$ 4,90 por mês!!!
Qualidade e preço baixo!
#5
Posted 28/08/2006, 08:02
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)