How can i create a vertical gallery in html and css
I'm creating a ecommerce store in php, my php code is working perfectly,
but my products are arranged vertically, and i want them arranged
horizontally.
I tried float: left, display:inline... But it doesnt work
i would like to see 4 products on the same line.
My php code(ignore the language)
<?php
$consulta = mysql_query("SELECT *
FROM `livros-desporto` ");
if(isset($_POST['buscar'])){
$consulta = mysql_query("SELECT * FROM `livros-desporto` where name
like '%".$_POST['buscar']."%'");
}
while ($linha = mysql_fetch_array($consulta))
{
$id = $linha['ID'];
$modelo = $linha['Model'];
$nome = $linha['Name'];
$categoria = $linha['Category'];
$imagem = $linha['Image'];
$manufactura = $linha['Manufacturer'];
$preco = $linha['Price'];
$quantidade = $linha['quantity']
// $adicionar = '<a
href="carrinho.php?id='.$linha['ID'].'"title="'.$linha['ID'].'">
// Adicionar </a>'
?>
My HTML code
<div class="fade1">
<div class="produtos">
<li>
<p><?php echo $nome ?></p>
<p><?php echo $imagem ?></p>
<p><?php echo $categoria ?></p>
</li>"
</div>
</div>
</div>
<?php
}
?>
Thanks
No comments:
Post a Comment