Created
May 5, 2015 09:21
-
-
Save williamukoh/c4af7bb29ff746a4b6c6 to your computer and use it in GitHub Desktop.
Full width page elements - JS Bin// source http://jsbin.com/lapogiluwe
This file contains 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"> | |
<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> |
This file contains 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
.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