Posted By

browncardigan on 02/08/10


Tagged


Versions (?)

vertical and horizontal centering with CSS


 / Published in: CSS
 

URL: http://bettesmidler.com/code/2009-09-03.htm

  1. body {
  2. text-align:center;
  3. }
  4.  
  5. div.content {
  6. position:absolute;
  7. height:200px;
  8. width:500px;
  9. top:50%;
  10. left:50%;
  11. margin-top:-100px;
  12. margin-left:-250px;
  13. background:#000;
  14. }

Report this snippet  

You need to login to post a comment.