Posted By

fsn on 05/20/09


Tagged

div css center vertical deadcenter horizontable horizontabel


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

fsn
hasantayyar
loric
esritter
Jarek


deadCenter a div in short


 / Published in: CSS
 

How to center a div horizontable and vertical ... in short code.

  1. #deadCenter {
  2. width: 700px;
  3. height: 450px;
  4.  
  5. margin: -225px 0 0 -350px;
  6. position: absolute;
  7. top: 50%;
  8. left: 50%;
  9. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: agurl on December 27, 2009

kiukik

Posted By: Daxander on April 13, 2011

Great... but try position:fixed; It works better.

You need to login to post a comment.