Skip to content

Instantly share code, notes, and snippets.

@tomraithel
Created November 16, 2012 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomraithel/4085422 to your computer and use it in GitHub Desktop.
Save tomraithel/4085422 to your computer and use it in GitHub Desktop.
SASS - Div with background and flexible main area
$paddingHeight: 50px;
background: transparent url(../img/b2b-content-middle.png) repeat-y;
min-height: 400px;
padding: 30px 30px 0 30px;
margin-bottom: $paddingHeight;
position: relative;
.main-content {
&:before,
&:after {
@include notext;
content: ".";
display: block;
height: $paddingHeight;
width: 711px;
left: 0;
position: absolute;
background: red;
}
&:before {
background: transparent url(../img/b2b-content-top.png) repeat-y;
top: - $paddingHeight;
}
&:after {
background: transparent url(../img/b2b-content-bottom.png) repeat-y;
bottom: - $paddingHeight;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment