Skip to content

Instantly share code, notes, and snippets.

@echosa
Created March 13, 2014 13:44
Show Gist options
  • Save echosa/9528745 to your computer and use it in GitHub Desktop.
Save echosa/9528745 to your computer and use it in GitHub Desktop.
<html>
<head>
<style type="text/css">
.container {
width: 100%;
border: 1px solid black;
background: #CCCCCC;
}
.theFloat {
float: left;
border: 1px solid red;
position: relative;
}
.fixTheFloat{
clear: both;
}
</style>
</head>
<body>
<div class="container">
This container lacks the fix.
<div class="theFloat">
This float is not enclosed by the surrounding div <br />container.
</div>
<div class="fixTheFloat" />
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment