Skip to content

Use a simpler clearfix #2

@necolas

Description

@necolas

You could simplify the clearfix code with the code below, works in all modern browsers.

.clearfix {
    *zoom: 1;
}

.clearfix:after {
    clear: both;
    content: "";
    display: table;
}

Source: http://nicolasgallagher.com/micro-clearfix-hack/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions