eu começei a faze uma loja virtual....
http://www.vitorm.logvelox.com/
E Como vocês pode ver a lista de produtos fika somente em uma coluna.....
Gostaria de saber Como Dividila em 2 colunas ou mais.....
Segue o codigo do index.php:
CÓDIGO
<?php
session_start();
include("conexao.php");
?>
<html>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:200px;
top:290px;
width:100px;
height:30px;
z-index:1;
overflow: visible;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
font-size: 18px;
}
.style2 {
font-size: 20px;
font-family: "Comic Sans MS";
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="JavaScript">
function abreJanela(Url,NomeJanela,width,height,extras) {
var largura = width;
var altura = height;
var adicionais= extras;
var topo = (screen.height-altura)/2;
var esquerda = (screen.width-largura)/2;
novaJanela=window.open(''+ Url + '',''+ NomeJanela + '','width=' + largura + ',height=' + altura + ',top=' + topo + ',left=' + esquerda + ',features=' + adicionais + '');
novaJanela.focus();
}
</script>
<body>
<table width="894" border="0">
<tr>
<td colspan="3"><div align="center"><img src="topo.jpg" width="700" height="200"></div></td>
</tr>
<tr>
<td width="156">
<table width="150" border="0">
<tr>
<td><div>
<div>
<p><img src="menu_topo.jpg" width="150" height="50">
<img src="menu_conteudo.jpg" width="150" height="50" border="0">
<img src="menu_conteudo.jpg" width="150" height="50">
<img src="menu_conteudo.jpg" width="150" height="50">
<img src="menu_conteudo.jpg" width="150" height="50">
<img src="menu_rodape.jpg" width="150" height="50"></p>
</div>
</div></td>
</tr>
</table></td>
<td width="560">
<div align="center">
<?php
// Faz o pedido ao banco de dados
// Esse "ORDER BY RAND()" serve pra exibir em ordem aleatória
$produtos = mysql_query("SELECT * FROM produtos ORDER BY RAND()", $con);
// Fique à vontade pra usar outras funções
// Como mysql_fetch_array
while($produto = mysql_fetch_assoc($produtos)) {
echo "<div>";
// Mostrando a imagem do produto e o nome
echo "<a href=\"#\" onClick=\"abreJanela('" . $produto["img_grande"] . "','" . $produto["nome"] . "','400','400','')\">";
echo "<img src=\"" . $produto["img"] . "\" /><br /><b>" . $produto["nome"] . "</b><br>";
// Mostrando o preço
echo "R\$ " . number_format($produto["preco"], 2, ",", "") . "<br>";
// Mostrando o botão pra adicionar ao carrinho
echo "<a href=\"carrinho.php?produto=" . $produto["id"] . "\"><img src=\"carrinho_2.jpg\" /></a> </b><br><br><br>";
echo "</div>";
}
?></div></td>
<td width="156"><table width="150" border="0">
<tr>
<td width="150"><a href="verProdutos.php"><img src="carrinho_1.jpg" width="150" height="50" border="0"></a></td>
</tr>
</table>
<p align="center">
<script LANGUAGE="JAVASCRIPT">
<!--
var now = new Date();
var mName = now.getMonth() +1;
var dName = now.getDay() +1;
var dayNr = now.getDate();
var yearNr=now.getYear();
if(dName==1) {Day = "Domingo";}
if(dName==2) {Day = "Segunda-feira";}
if(dName==3) {Day = "Terça-feira";}
if(dName==4) {Day = "Quarta-feira";}
if(dName==5) {Day = "Quinta-feira";}
if(dName==6) {Day = "Sexta-feira";}
if(dName==7) {Day = "Sábado";}
if(mName==1){Month = "Janeiro";}
if(mName==2){Month = "Fevereiro";}
if(mName==3){Month = "Março";}
if(mName==4){Month = "Abril";}
if(mName==5){Month = "Maio";}
if(mName==6){Month = "Junho";}
if(mName==7){Month = "Julho";}
if(mName==8){Month = "Agosto";}
if(mName==9){Month = "Setembro";}
if(mName==10){Month = "Outubro";}
if(mName==11){Month = "Novembro";}
if(mName==12){Month = "Dezembro";}
if(yearNr < 2000) {Year = 1900 + yearNr;}
else {Year = yearNr;}
var todaysDate =(" " + Day + ", " + dayNr + "/" + Month + "/" + Year);
document.write(' '+todaysDate);
//-->
</SCRIPT>
<SPAN ID="Clock">00:00:00</SPAN>
<script LANGUAGE="JavaScript">
<!--
var Elem = document.getElementById("Clock");
function Horario(){
var Hoje = new Date();
var Horas = Hoje.getHours();
if(Horas < 10){
Horas = "0"+Horas;
}
var Minutos = Hoje.getMinutes();
if(Minutos < 10){
Minutos = "0"+Minutos;
}
var Segundos = Hoje.getSeconds();
if(Segundos < 10){
Segundos = "0"+Segundos;
}
Elem.innerHTML = Horas+":"+Minutos+":"+Segundos;
}
window.setInterval("Horario()",1000);
//-->
</SCRIPT
></p></td>
</tr>
</table>
</body></html>
session_start();
include("conexao.php");
?>
<html>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:200px;
top:290px;
width:100px;
height:30px;
z-index:1;
overflow: visible;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
font-size: 18px;
}
.style2 {
font-size: 20px;
font-family: "Comic Sans MS";
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
<script language="JavaScript">
function abreJanela(Url,NomeJanela,width,height,extras) {
var largura = width;
var altura = height;
var adicionais= extras;
var topo = (screen.height-altura)/2;
var esquerda = (screen.width-largura)/2;
novaJanela=window.open(''+ Url + '',''+ NomeJanela + '','width=' + largura + ',height=' + altura + ',top=' + topo + ',left=' + esquerda + ',features=' + adicionais + '');
novaJanela.focus();
}
</script>
<body>
<table width="894" border="0">
<tr>
<td colspan="3"><div align="center"><img src="topo.jpg" width="700" height="200"></div></td>
</tr>
<tr>
<td width="156">
<table width="150" border="0">
<tr>
<td><div>
<div>
<p><img src="menu_topo.jpg" width="150" height="50">
<img src="menu_conteudo.jpg" width="150" height="50" border="0">
<img src="menu_conteudo.jpg" width="150" height="50">
<img src="menu_conteudo.jpg" width="150" height="50">
<img src="menu_conteudo.jpg" width="150" height="50">
<img src="menu_rodape.jpg" width="150" height="50"></p>
</div>
</div></td>
</tr>
</table></td>
<td width="560">
<div align="center">
<?php
// Faz o pedido ao banco de dados
// Esse "ORDER BY RAND()" serve pra exibir em ordem aleatória
$produtos = mysql_query("SELECT * FROM produtos ORDER BY RAND()", $con);
// Fique à vontade pra usar outras funções
// Como mysql_fetch_array
while($produto = mysql_fetch_assoc($produtos)) {
echo "<div>";
// Mostrando a imagem do produto e o nome
echo "<a href=\"#\" onClick=\"abreJanela('" . $produto["img_grande"] . "','" . $produto["nome"] . "','400','400','')\">";
echo "<img src=\"" . $produto["img"] . "\" /><br /><b>" . $produto["nome"] . "</b><br>";
// Mostrando o preço
echo "R\$ " . number_format($produto["preco"], 2, ",", "") . "<br>";
// Mostrando o botão pra adicionar ao carrinho
echo "<a href=\"carrinho.php?produto=" . $produto["id"] . "\"><img src=\"carrinho_2.jpg\" /></a> </b><br><br><br>";
echo "</div>";
}
?></div></td>
<td width="156"><table width="150" border="0">
<tr>
<td width="150"><a href="verProdutos.php"><img src="carrinho_1.jpg" width="150" height="50" border="0"></a></td>
</tr>
</table>
<p align="center">
<script LANGUAGE="JAVASCRIPT">
<!--
var now = new Date();
var mName = now.getMonth() +1;
var dName = now.getDay() +1;
var dayNr = now.getDate();
var yearNr=now.getYear();
if(dName==1) {Day = "Domingo";}
if(dName==2) {Day = "Segunda-feira";}
if(dName==3) {Day = "Terça-feira";}
if(dName==4) {Day = "Quarta-feira";}
if(dName==5) {Day = "Quinta-feira";}
if(dName==6) {Day = "Sexta-feira";}
if(dName==7) {Day = "Sábado";}
if(mName==1){Month = "Janeiro";}
if(mName==2){Month = "Fevereiro";}
if(mName==3){Month = "Março";}
if(mName==4){Month = "Abril";}
if(mName==5){Month = "Maio";}
if(mName==6){Month = "Junho";}
if(mName==7){Month = "Julho";}
if(mName==8){Month = "Agosto";}
if(mName==9){Month = "Setembro";}
if(mName==10){Month = "Outubro";}
if(mName==11){Month = "Novembro";}
if(mName==12){Month = "Dezembro";}
if(yearNr < 2000) {Year = 1900 + yearNr;}
else {Year = yearNr;}
var todaysDate =(" " + Day + ", " + dayNr + "/" + Month + "/" + Year);
document.write(' '+todaysDate);
//-->
</SCRIPT>
<SPAN ID="Clock">00:00:00</SPAN>
<script LANGUAGE="JavaScript">
<!--
var Elem = document.getElementById("Clock");
function Horario(){
var Hoje = new Date();
var Horas = Hoje.getHours();
if(Horas < 10){
Horas = "0"+Horas;
}
var Minutos = Hoje.getMinutes();
if(Minutos < 10){
Minutos = "0"+Minutos;
}
var Segundos = Hoje.getSeconds();
if(Segundos < 10){
Segundos = "0"+Segundos;
}
Elem.innerHTML = Horas+":"+Minutos+":"+Segundos;
}
window.setInterval("Horario()",1000);
//-->
</SCRIPT
></p></td>
</tr>
</table>
</body></html>
Agradeço desce já.....
Grato, Vitor Martinelli Braga.

Help














