Created
May 13, 2011 16:34
-
-
Save eralston/970845 to your computer and use it in GitHub Desktop.
CSS Snippet for clearing after an element - http://www.positioniseverything.net/easyclearing.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
.clearfix:after { | |
content: "."; | |
display: block; | |
height: 0; | |
clear: both; | |
visibility: hidden; | |
} | |
.clearfix {display: inline-block;} /* for IE/Mac */ | |
</style><!-- main stylesheet ends, CC with new stylesheet below... --> | |
<!--[if IE]> | |
<style type="text/css"> | |
.clearfix { | |
zoom: 1; /* triggers hasLayout */ | |
display: block; /* resets display for IE/Win */ | |
} /* Only IE can see inside the conditional comment | |
and read this CSS rule. Don't ever use a normal HTML | |
comment inside the CC or it will close prematurely. */ | |
</style> | |
<![endif]--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment