Posted By

cesarkohl on 09/14/11


Tagged

css html layout center centered horizontal vertical


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

spee66


Horizontal + Vertical Centered Layout


 / Published in: CSS
 

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <style type="text/css" media="screen">
  7. #limites { position: absolute; width: 100px; height: 100px; background: blue; left: 50%; top: 50%; margin: -50px; }
  8. </style>
  9. </head>
  10. <body>
  11. <div id="limites">
  12.  
  13. </div>
  14. </body>
  15. </html>

Report this snippet  

You need to login to post a comment.