Using <body> as <div id="container">


/ Published in: CSS
Save to your folder(s)

I'm tired of <div id="container">


Copy this code and paste it in your HTML
  1. html {
  2. margin:0;
  3. padding:0;
  4. width:100%;
  5. height:100%;
  6. text-align:center; /* IE text-align fix */
  7. background-color:#2c2c2c;
  8. }
  9. body {
  10. position:relative;
  11. text-align:left; /* fixing the IE bug with the text */
  12. margin:0 auto;
  13. height:100%;
  14. width:960px; /* change this width to what you want */
  15. background-color:#fefefe;
  16. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.