I use my code as & brt; I'm very used to cleaning using br style = "clear: both" / & gt;
But the content keeps changing and I'm not sure that this is the best practice
There is one (from positioneverything) available that allows you to get the same result without clearing the divi. But ... they claim that the hack is a bit old and instead you should probably see it. But .. after reading the comment through 700 pages :) It seems that some work can not be done later.
I would like to avoid any javascript hacks because I would like to do my clearing to work even though javascript is enabled.
What is the best practice for clearing the browser independently?
Update : In 2014, you should use clearfix technology that is pseudo Elements were used, as is the modern way of clearing floats described by @Radrigo Manguinho; For a more up-to-date method, see Micro Clearfix of Nicholas Gallagher:
Original Answer:
I really do not like to use additional non-semantic markups, so I'm far from using clearing Want to stay Element Just apply the overflow: hidden
to the float's parents to clear them. Cross browser works, no problem I believe overflow: auto;
also works.
Obviously, if you want to use a different overflow property, this will not work, but due to the IE 6 extension box bug, I
.
Comments
Post a Comment