I have two divs, 1 floats left the other right.
I need to add a clearfix after the right float and have been reading up on using the :after selector.
I’ve tried to create this style and add the relevant attributes only it doesnt seem to work, am I understanding this rule incorrectly?
Any advice would be great!
It’s the footer that you want to add the clear fix to:
What you’re basically saying here is that at the end of the #footer div, add some content and make it display block, then make it clear both. This will pull the footer down over all floating content.
Update of your code: http://jsfiddle.net/hjP6f/1/
.