LUCiD GRAFiX Logo

Tutorial
YouTube RSS Feed
Search

TUTORIAL

How to make a proper clearfix

Written by Posted on December 6th, 2013 No Comments
Share This

How to make a proper clearfix

Today we are going over how to make a .clearfix, before HTML5 the typical way was just to give an element a class like .clr and apply clear:both to that element after the floated element and this would clear the above floated element with in the parent element, but it would add an empty div.

So with the new HTML5 there is a new way to do that using  the clearfix technique.

You want to add it to the parent element and it clears the floated child elements.

About

Hi, my name is Eric Young. I’m a web designer who has worked in the IT industry since 2000. I love blogging and making the web a better place. If I'm not here I'm probably playing Gears of War. LOL

Related Articles You Might Enjoy!

LESS Basics LESS Preprocessor Fundamentals
CSS3 Menu using only CSS and no JavaScript CSS3 Menu using only CSS and no JavaScript
How to make a CSS sprite in Photoshop and then bring it to life – Revisited How to make a CSS sprite in Photoshop and then bring it to life – Revisited
Leave a comment

Leave a Reply