Skip to content

Instantly share code, notes, and snippets.

@nathansmith
Last active December 10, 2018 21:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nathansmith/1260785 to your computer and use it in GitHub Desktop.
Save nathansmith/1260785 to your computer and use it in GitHub Desktop.
// `Clearfix
//--------------------------------------------------
// Can be added to other style rules via:
//
// #foobar
// @extend .clearfix
.clearfix:before,
.clearfix:after
content: "."
display: block
overflow: hidden
visibility: hidden
font-size: 0
line-height: 0
width: 0
height: 0
.clearfix:after
clear: both
.clearfix
zoom: 1
/*
In a Sass file, if you type...
#foobar
@extend .clearfix
It will output this CSS...
*/
.clearfix:before,
.clearfix:after,
#foobar:before,
#foobar:after {
content: ".";
display: block;
overflow: hidden;
visibility: hidden;
font-size: 0;
line-height: 0;
width: 0;
height: 0;
}
.clearfix:after,
#foobar:after {
clear: both;
}
.clearfix,
#foobar {
zoom: 1;
}
@aog1971
Copy link

aog1971 commented Sep 20, 2013

Hi, I can not solve the problem Chrome and firefox ... only works in IE (10):

html:

ul class='ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-wudget-header ui-corner-all'

css:
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display:table;
border-collapse: collapse;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment