Hello,
How can I leave a <div>
with dynamic height, that is, when the <div>
with the contents of the products grow the <div>
that contains the menu also grow together, getting both with the same height? p>
I made a few attempts and I did not succeed, I have this:
The div that 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 that I tried to change looked 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 could not solve it.
The site for a demo can be found here: Site