CSS Floats 101

by Noah Stokes

64 Reader Comments

Back to the Article
  1. Those collapsing elements can be problematic when trying to get containers to grow. I usually make sure the parent element is floated as well to encourage its growth, but it doesn’t always work when I’m playing around with some unorthodox layouts.  I’m going to adopt more clears into my life. I usually employ them after floats; never thought to use them to combat collapsing containers. Awesome article! Thanks!

    Copy & paste the code below to embed this comment.
  2. I can breath again. I’ve read many articles on floats and clear. Best lesson on clear I’ve run across. A lifesaver when having a repeating background in a container. And really helpful because it is written and illustrated in a language that novices can understand. Thanks.

    Copy & paste the code below to embed this comment.
  3. Noah thank you for the clear and simplifying way you explained floats. That said where can I get a “Bacon Loving Unicorn” that you mention?

    Copy & paste the code below to embed this comment.
  4. I just can’t explain you how much this article has helped me “clear:both;” my mind and body from understanding this issue.

    Great Article!

    Copy & paste the code below to embed this comment.