Here is an example that I have:
https://jsfiddle.net/2z2ksLy4/
HTML:
<div class="one">
test
</div>
<div class="two">
test2
</div>
CSS:
.one{
width:400px;
border:1px solid red;
min-height: 200px;
float:left;
display:block;
}
.two{
width:200px;
border:1px solid red;
heigth: 200px;
float:left;
display:block;
position:fixed;
}
<div class="one">
test
</div>
<div class="two">
test2
</div>
Why isn't the float working in the second div (div with class .two)?
The second div seems to behave like a position:absolute
.
Can anyone explain this behavior?