4
Hello I’m learning now how to deal with css, and fall into a situation that I found nowhere the answer, I will be very grateful if someone can help me.
.pai-com-overflow{
border: 1px solid red;
overflow:hidden;
margin-bottom: 20px;
}
.pai-sem-overflow {
border: 1px solid red;
}
.filho {
float: left;
}
<div class="pai-com-overflow">
<div class="filho">
CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO
</div>
</div>
<div class="pai-sem-overflow">
<div class="filho">
CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO CONTEUDO
</div>
</div>
In this example I have a div father and a div son, the div son is with float: left
and that’s where I didn’t understand, and the question is :
For when I have a div son with float: left
and father with overflow:hidden
, the father div gets filled assuming height and width and without overflow: hidden
nay.
Thank you.