1
Hello,
How can I leave a <div>
with dynamic height, that is, when the <div>
with the content of the products grow the <div>
that contains the menu also grow together, getting both the same height?
I made some attempts and did not succeed, I have it:
The div who accommodates my menu:
<aside id="sidebar" class="one-fourth">
<div class="widget">
<h3>Selecionados:</h3>
<nav>
<ul class="menu">
<li><a href="#"><?php echo $row_rsDepartamento['descricao']; ?> (<?php echo $totalRows_rsProdutos; ?>)</a></li>
<li class="current-menu-item"></li>
</ul>
</nav>
</div>
</aside>
The div that accommodates my products:
<div class="team-member one-fourth">
<a href="detalhes.php?produto=<?php echo $row_rsProdutos['id_produto']; ?>&dep=<?php echo $row_rsProdutos['id_departamento']; ?>&subdep=<?php echo $row_rsProdutos['id_subdepartamento']; ?>"><img class="photo" src="<?php echo $foto; ?>" /></a>
<div class="content">
<h3 class="name"><?php echo $row_rsProdutos['descricao']; ?> </h3>
<span class="job-title"> <?php echo $row_rsProdutos['codigo_msb']; ?> </span>
</div>
</div>
The css I tried to change got like this:
#sidebar .widget {
margin-bottom: 30px;
width: 210px;
min-height: 600px;
height: auto;
}
.team-member {
text-align: center;
margin-bottom: 20px;
}
.one-fourth {
width: 23.5%;
max-width: 220px;
height: auto;
}
But unfortunately I couldn’t solve.
The site for a demo can be found here: Website
Hello @Jonatas Oliveira, first, thank you very much for the tips, I did as suggested but I did not get a favorable result.
– adventistapr
Sorry for the previous comment, I re-did the code, now properly correct and the result was splendid. Thank you very much.
– adventistapr