Skip to content

Instantly share code, notes, and snippets.

@williamukoh
Created May 5, 2015 09:21
Show Gist options
  • Save williamukoh/c4af7bb29ff746a4b6c6 to your computer and use it in GitHub Desktop.
Save williamukoh/c4af7bb29ff746a4b6c6 to your computer and use it in GitHub Desktop.
Full width page elements - JS Bin// source http://jsbin.com/lapogiluwe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.strip{ background: yellow; color: black; padding:9em; margin-top: 3em; }
.container { width:70%; margin:3em auto; border:1px black dotted; position:relative; height: 500px; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d; }
.c { padding: 1em; margin:0 5em; background: red; text-align:center;}
body
{
overflow-x: hidden;
}
.extendfull, .extendleft
{
padding-left: 30000px;
margin-left: -30000px;
}
.extendfull, .extendright
{
padding-right: 30000px;
margin-right: -30000px;
}
</style>
</head>
<body>
<div class="container">
<div class="strip extendfull"><div class="c">Hello</div></div>
</div>
<script id="jsbin-source-css" type="text/css">
.strip{ background: yellow; color: black; padding:9em; margin-top: 3em; }
.container { width:70%; margin:3em auto; border:1px black dotted; position:relative; height: 500px; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d; }
.c { padding: 1em; margin:0 5em; background: red; text-align:center;}
body
{
overflow-x: hidden;
}
.extendfull, .extendleft
{
padding-left: 30000px;
margin-left: -30000px;
}
.extendfull, .extendright
{
padding-right: 30000px;
margin-right: -30000px;
}</script>
</body>
</html>
.strip{ background: yellow; color: black; padding:9em; margin-top: 3em; }
.container { width:70%; margin:3em auto; border:1px black dotted; position:relative; height: 500px; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d; }
.c { padding: 1em; margin:0 5em; background: red; text-align:center;}
body
{
overflow-x: hidden;
}
.extendfull, .extendleft
{
padding-left: 30000px;
margin-left: -30000px;
}
.extendfull, .extendright
{
padding-right: 30000px;
margin-right: -30000px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment