Posted By

catchatpas on 08/12/09


Tagged

div center


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

catchatpas
rickfu
tmbrenneke


Center Div


 / Published in: CSS
 

  1. .centered_div {
  2. width: 100px;
  3. height: 100px;
  4. position: absolute;
  5. top: 50%;
  6. left: 50%;
  7. margin-left: -50px;
  8. margin-top: -50px;
  9. background: red;
  10. }

Report this snippet  

You need to login to post a comment.