Created
May 15, 2013 12:56
-
-
Save dilrajahdan/5583813 to your computer and use it in GitHub Desktop.
Full width background hack with no wrapping div
This file contains hidden or 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
| // CSS | |
| .module{ | |
| width: 940px; | |
| margin:auto | |
| } | |
| .content{ | |
| background: blue; | |
| margin:0 -9999px; | |
| padding:0 9999px; | |
| } | |
| // HTML | |
| <section class="module"> | |
| <div class="content"> | |
| <h1>Hello</h1> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit quis qui debitis labore ducimus quo repellat accusamus dignissimos. Saepe omnis aperiam maxime architecto debitis autem consequatur voluptate aliquid similique alias.</p> | |
| </div> | |
| </section> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment