Float bug fix in div to expand

/ Published in: CSS
Save to your folder(s)

Copy this code and paste it in your HTML
  1. HTML:
  2. <div class="container">
  3. <div class="inner_div">
  4. blablabla <br> blablabla <br> blablabla<br>
  5. </div>
  6. </div>
  8. CSS:
  9. .container{width:300px;background:red;}
  10. .inner_div{float:left;width:200px;font:12px arial;}
  12. Just add
  13. .container{overflow:hidden;}

URL: http://htmlcsstutorials.blogspot.com/2009/07/float-bug-fix-in-div-to-expand.html

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.