There are some methods to solve the clearfix.
I want to know if any body has some experience about applying clearfix to all elements.
Is there any issue that could cause a notable problem ?
There are some methods to solve the clearfix. I want to know if any
Share
If you apply clearfix to all elements, then you won’t be able to float anything at all because every single element you try to float is going to be cleared immediately.1
If you must use clearfix, you should only use it when absolutely necessary. This means you have to specify which elements you want to apply it to, rather than just giving it to every element.
1 Well, it depends on what kind of clearfix you’re using. If you’re using the
:afterpseudo-element, for instance, then it’s not going to apply to certain elements in certain browsers. My point still stands, though.