I cannot understad why this code doesn't prevent the footer from spanning up to the top with the clearfix hack. It does work with the overflow hidden technique, and also with the div with clear both.
Yeah, that is one thing that always work. I also found out that clearing the footer also works in this case. What I can't understand why appying the cf class to the footer doesn't work.
could someone explain, why this new hack for clearing divs cf:after and cf:before is better than the oldie: div { clear:both } ?
Old hack is much shorter, plus it works on all browsers nowadays..
The only pro I see on new is that with .class you can target few divs.
I personally don't think it is better. I just think each one has its pros and cons. The clear fix technique frees one of having to write additional markup just for presentation, but I don't think that is a big deal anyway.
Bookmarks