Diving positioning

2

I have a problem positioning the divs of the products they do not align.

link

As you can see here in the CSS I have:

.produto_em_destaque{
     display: table;
     width: 70%;
     float: right;}

.produtos_em_destaque{
     display: inline-table;
     width: 20%;
     height: 283px;
     text-align: center;
    }

In HTML I have:

<div id="produto_em_destaque" class="produto_em_destaque">
<?php
while($row = $result->fetch_assoc()) {
?>
<div class="produtos_em_destaque">
 <a href=<?php echo "produto.php?id=" . $row['id']; ?>>
 <img class="produtos_em_destaque_img" src=<?php echo "imagens/" . $row['imagem'] ?>>
<h4><?php echo $row['nome'] ?></h4>
<span><?php echo $row['preco'] ?>€</span>
</a>
</div>
<?php
}
?>
    
asked by anonymous 26.06.2017 / 13:21

1 answer

2

In your case, using the CSS vertical-align property setting the top value . But you may have to rethink the way you're doing mobile compatibility.

    
26.06.2017 / 14:00