How CSS floated div behaving without clearfix

Buddah

New Member
Hey guys need some help on the html and css float stuff. Please check http://jsfiddle.net/anilnamde/DVJ4b/ and and following are the queries i have. Also including code below\[code\] .p{ background:red; width:100%; padding:20px;}.p div{ width:49%; background:blue; float:left; margin-left:5px; min-height: 200px;}</style><body><div class="p"> <div> first </div> <div>second </div> This is the test text</div><p>This is good</p></body>\[/code\][*]As per my understanding p tag and text inside parent div should go behind the two floated elements. Which is not happening.[*]Again somehow without any clearfix or clear both or overflow hidden parent div's height is appearing correct. Which is kind of getting difficult to understand.Can someone help me understand this. As as per what i was started to understand its standard example to understand float related issue and apply clearfix to fix it. But suddenly i found its started working fine without clearfix. So i am currently kind of not really sure about my float understanding.
 
Back
Top