You usually apply clearfix to the element that contains all of your floats.
However, in this case the easiest solution is to not use clearfix at all to contain the floats, but instead to use clear: both
on footer
:
http://jsfiddle.net/thirtydot/4NJ6v/3/
If you really wanted to use clearfix here, it would look like this:
http://jsfiddle.net/thirtydot/4NJ6v/6/
As you can see, an extra wrapping div
had to be added, which isn't great.