Answer the question
In order to leave comments, you need to log in
What if we use overflow: hidden instead of clearfix?
There is such a popular trick in layout as clearfix. This trick is mostly used in situations like here .
Without clearfix, this would happen . That is, blocks with floats fall out of the stream.
But what if you solve the problem without using clearfix, just setting the parent "overflow: hidden". Here is an example . It will turn out less code without any extraneous tricks / hacks. Or is there some kind of trick?
Answer the question
In order to leave comments, you need to log in
Or is there some kind of trick?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question