1
I have a div
internal overlapping the external.
Behold:
Note in the image above that the div
external does not involve the whole internal.
HTML and CSS
.conteudo{
width: 100%;
max-width: 1200px;
border: 1px solid #ccc;
margin: 10px auto;
box-sizing: border-box;
}
.menu{
width: auto;
height: auto;
padding: 10px;
box-sizing: border-box;
font-size: 20px;
}
.lista{
width: 100%;
height: auto;
padding: 10px;
box-sizing: border-box;
}
.lista-recursos{
position: relative;
float: left;
width: 25%;
height: auto;
padding: 10px;
box-sizing: border-box;
background-color: #ccc;
margin-bottom: 20px;
font-size: 13px;
text-align: center;
}
.link-lista{
text-decoration: none;
font-size: 13px;
background-color: #ccc;
}
<div class="conteudo">
<strong><div class="menu">Lista - Guia comercial</div></strong>
<?php
$lista=mysqli_query($con,"select id,titulo,status from empresas");
while($painel_lista=mysqli_fetch_array($lista))
{
?>
<div class="lista">
<?php echo $painel_lista['titulo']; ?>
</div>
<div class="lista-recursos">
<a href="editar-guia-comercial.php?id=<?php echo $painel_lista['id']; ?>" class="link-lista">EDITAR</a>
</div>
<div class="lista-recursos">
<?php
if ($painel_lista['status'] == 1) {
?>
<a href="status-guia-comercial.php?id=<?php echo $painel_lista['id']; ?>&status_alterar=2" class="link-lista">ATIVADO</a>
<?php
} else {
?>
<a href="status-guia-comercial.php?id=<?php echo $painel_lista['id']; ?>&status_alterar=1" class="link-lista">DESATIVADO</a>
<?php
}
?>
</div>
<div class="lista-recursos">
<a href="confirmar-deletar.php?id=<?php echo $painel_lista['id']; ?>" class="link-lista">DELETAR</a>
</div>
<div class="lista-recursos">
<a href="banner-guia-comercial.php?id=<?php echo $painel_lista['id']; ?>" class="link-lista">BANNER</a>
</div>
<?php
}
?>
</div>
Can you put the rendered HTML here? ie what comes to the browser, and not PHP.
– Sergio
creates a div at the end like this: <div style="clear:Both"></div> has to be the last one on the list
– Matheus Lopes Marques