Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Yes, we used clear:both. This is a normal css property, nothing special about it.
But clearfix is not just clear:both. The minimum clearfix code also depends on the browser.
clearfix is a pain in the ass, since float elements were not originally intended to be used to build a page layout. But what to do, flexboxes have just appeared.
If you have ever seen the options for wrapping images with text in all sorts of Words, then I think you can catch the essence of this css property.
It seems to me that there was no ::after ::before before, similar things were not supported everywhere like now, and therefore they wrote empty blocks like
Sergey Chikuenok even had such a hack chikuyonok.ru/2009/06/float-columns
.clear {
clear:both;
font-size:0;
overflow:hidden; /* тройной презерватив для IE */
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question