DIV CENTRADO HORIZONTAL Y VERTICALMENTE


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



Copy this code and paste it in your HTML
  1. #mydiv {
  2. position:absolute;
  3. top: 50%;
  4. left: 50%;
  5. width:30em;
  6. height:18em;
  7. margin-top: -9em; /*set to a negative number 1/2 of your height*/
  8. margin-left: -15em; /*set to a negative number 1/2 of your width*/
  9. border: 1px solid #ccc;
  10. background-color: #f3f3f3; }

URL: http://www.nudonation.com/archivos/css/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.