I really cannot understand why the overflow:hidden makes the float property effect to be erased.
here`s the sources below which I'm having hard time with.
<div class="float-frame">
<div class="float-unit">A</div>
<div class="float-unit">B</div>
<div class="float-unit">C</div>
<div class="float-unit">D</div>
</div> <!--html5 sources--!>
.float-frame {
background: #eee;
border: 1px solid #ddd;
padding: 10px;
overflow:hidden;}
.float-unit {
width: 50px;
background: #333;
color: #fff;
font-size: 18px;
font-weight: bold;
text-align: center;
padding: 15px 0;
float: left; /* css3 sources */
}
as you see, the existence of overflow:hidden property makes the view totally different from the case with which the property does not exist.
I learned that the overflow:hidden property is for making the content invisible when it overflows the box to which the content is belonged.
but why is that happening? I mean the overflow:hidden property makes the float effect erased..
I've searched a lot of articles.. but I couldn't get myself totally understood.