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.
greatblue
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.
64 Reader Comments
Back to the ArticleAndrew Wade
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!
greatblue
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.
Professional Web Design Company
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?
Carlos Adan Cortes De la Fuente
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!