Last active
March 10, 2017 13:10
-
-
Save plugn/c97c3e880b92378893396ddde600b023 to your computer and use it in GitHub Desktop.
float grid 3 col layout // source https://jsbin.com/veriva
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.clearfix::after { | |
display: table; | |
content: ""; | |
clear: both; | |
} | |
.col { | |
width: 70px; | |
border: 1px dashed blue; | |
min-height: 80px; | |
padding: 5px; | |
} | |
.col.left { | |
float: left; | |
} | |
.col.right { | |
float: right; | |
} | |
.main { | |
background-color: #ddd; | |
margin: 0 90px; | |
width: auto; | |
} | |
.container { | |
width: 350px; | |
border: 1px solid pink; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container clearfix"> | |
<div class="col left"> | |
left | |
</div> | |
<div class="col right"> | |
right | |
</div> | |
<div class="col main"> | |
main | |
</div> | |
<script id="jsbin-source-css" type="text/css">.clearfix::after { | |
display: table; | |
content: ""; | |
clear: both; | |
} | |
.col { | |
width: 70px; | |
border: 1px dashed blue; | |
min-height: 80px; | |
padding: 5px; | |
} | |
.col.left { | |
float: left; | |
} | |
.col.right { | |
float: right; | |
} | |
.main { | |
background-color: #ddd; | |
margin: 0 90px; | |
width: auto; | |
} | |
.container { | |
width: 350px; | |
border: 1px solid pink; | |
} | |
</script> | |
</body> | |
</html> |
This file contains hidden or 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
.clearfix::after { | |
display: table; | |
content: ""; | |
clear: both; | |
} | |
.col { | |
width: 70px; | |
border: 1px dashed blue; | |
min-height: 80px; | |
padding: 5px; | |
} | |
.col.left { | |
float: left; | |
} | |
.col.right { | |
float: right; | |
} | |
.main { | |
background-color: #ddd; | |
margin: 0 90px; | |
width: auto; | |
} | |
.container { | |
width: 350px; | |
border: 1px solid pink; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment