Monkey Do

Some folks have been asking us over at HTML5 Reset how to use the .mod class to clear floats. Welp, there are two ways:

1. Add the class mod to any parent of a floated element that you’d like to clear, like this:

<ul id="mainNav" class="mod">

… or …

2. Add the element you’d like cleared to the core.css file, like this:

ul#mainNav:after,
.mod:after { ...

… then, do the same thing in the _patches/win-ie-all.css file, to make sure floats are clearing in IE as well.

We prefer option #2, since it keeps our HTML files a little cleaner, but since you have to update two files, it’s slightly more work.

And there you go!

Home