Skip to content

Instantly share code, notes, and snippets.

@mootari
Created October 17, 2014 16:30
Show Gist options
  • Save mootari/5ae35beeb1bd14986e49 to your computer and use it in GitHub Desktop.
Save mootari/5ae35beeb1bd14986e49 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div id="wrapper">
<div id="main">Main <span class="layout-breaker">Breaker</span></div>
<div id="left">Left <span class="layout-breaker">Breaker</span></div>
<div id="right">Right <span class="layout-breaker">Breaker</span></div>
</div>
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
$left: 160px;
$right: 300px;
#wrapper {
overflow: hidden;
padding-left: $left;
padding-right: $right;
background: #aaa;
max-width: 1280px;
margin: 0 auto;
}
#left, #main, #right {
padding: 10px;
box-sizing: border-box;
min-height: 100%;
}
.layout-breaker {
width: 120%;
background: red;
display: block;
}
#left {
width: $left;
margin-left: -$left;
float: left;
background: #faa;
}
#main {
float: left;
top: 5px;
width: 100%;
background: #afa;
margin-right: -100%;
height: 200px;
}
#right {
margin-right: -$right;
margin-left: -100%;
width: $right;
float: right;
background: #aaf;
}
#wrapper {
overflow: hidden;
padding-left: 160px;
padding-right: 300px;
background: #aaa;
max-width: 1280px;
margin: 0 auto;
}
#left, #main, #right {
padding: 10px;
box-sizing: border-box;
min-height: 100%;
}
.layout-breaker {
width: 120%;
background: red;
display: block;
}
#left {
width: 160px;
margin-left: -160px;
float: left;
background: #faa;
}
#main {
float: left;
top: 5px;
width: 100%;
background: #afa;
margin-right: -100%;
height: 200px;
}
#right {
margin-right: -300px;
margin-left: -100%;
width: 300px;
float: right;
background: #aaf;
}
<div id="wrapper">
<div id="main">Main <span class="layout-breaker">Breaker</span></div>
<div id="left">Left <span class="layout-breaker">Breaker</span></div>
<div id="right">Right <span class="layout-breaker">Breaker</span></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment