Skip to content

Instantly share code, notes, and snippets.

@rachellawson
Last active September 3, 2015 12:05
Show Gist options
  • Select an option

  • Save rachellawson/7ca60995a43bdf14f9cd to your computer and use it in GitHub Desktop.

Select an option

Save rachellawson/7ca60995a43bdf14f9cd to your computer and use it in GitHub Desktop.
to use <p class="wide">something</p>
//add <p class="wide"> to make a <p> stretch a grey background across full width
.wide {
background-color: #aaa;
position: relative;
padding: 20px 0;
}
.wide:before,
.wide:after {
content: ' ';
background-color: #aaa;
position: absolute;
display: compact;
width: 9999px;
height: 100%;
}
.wide:before {
left: -9999px;
top: 0px;
}
.wide:after {
top: 0px;
right: -9999px;
}
//we need to stop the wide banners :before and :after making the page to wide - hide overflow
.l-page {
width: 100%;
overflow-x: hidden;
}
@rachellawson
Copy link
Author

updated to very wide sideblobs just for @seutje ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment