freestyle developments

  • Jump to page content
  • home
  • blog
  • about
  • projects
  • contact

Tag Archives: clearfix

LESS CSS clearfix

Posted on 2011.11.09 by Alan
99 Replies

The fantastic clearfix, as a LESS CSS class:

.clearfix {
    zoom: 1;
    &:before, &:after {
        content: "";
        display: table;
    }
    &:after {
        clear: both;
    }
}

Use in your code like so:

ul#gallery {
    .clearfix;
    li {
        float: left;
    }
}

Easy.

Posted in CSS | Tagged clearfix, CSS, Less | 99 Replies

Search

Tags

adobe Apache case insensitive case sensitive Chrome concurrency CSS CSS3 cycling gloves Dependencies Firefox flash FreeMarker GroupAgent HFS+ HTML5 HTTP IE6 IE7 Internet Exploder 6 Java JavaScript JPA jQuery JSIO Less mac MooTools mountain biking mysql Node NPM PHP RequireJS Safari Scala Spring String url Validation Webalizer webkit wordpress WTF XP

Categories

  • .NET (1)
  • Blog (2)
  • Browsers (1)
  • CMS (2)
  • CSS (8)
  • Design (1)
  • Flash (1)
  • Frameworks (4)
  • FreeMarker (4)
  • Grinds My Gears (10)
  • Hosting (4)
  • HTML5 (12)
  • Java (8)
  • JavaScript (19)
  • Node.js (3)
  • OS (1)
  • PHP (4)
  • Scala (2)
  • Servers (2)
  • Sports (1)
  • Spring (3)
  • SQL (2)
  • Version Control (1)

Archives

  • June 2013 (1)
  • February 2013 (1)
  • January 2013 (2)
  • November 2012 (1)
  • October 2012 (3)
  • September 2012 (1)
  • August 2012 (1)
  • May 2012 (1)
  • April 2012 (1)
  • March 2012 (1)
  • January 2012 (4)
  • November 2011 (6)
  • August 2011 (4)
  • July 2011 (1)
  • June 2011 (1)
  • May 2011 (1)
  • April 2011 (2)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (3)
  • December 2010 (4)
  • November 2010 (3)
  • October 2010 (1)
  • September 2010 (2)
  • July 2010 (2)
  • May 2010 (1)
  • February 2010 (1)
  • January 2010 (1)
  • December 2009 (2)
  • December 2008 (1)
  • October 2008 (1)
  • August 2008 (1)
  • May 2008 (1)
  • Follow _alanshaw on Twitter
  • accessibility information
  • © 2026 freestyle developments