×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: CSS
Posted by: A973C FR
Added: Sep 24, 2012 6:20 AM
Views: 34
  1. #mydiv {
  2.     position:absolute;
  3.     top: 50%;
  4.     left: 50%;
  5.     width:350px;
  6.     height:300px;
  7.     margin-top: -150px; /*set to a negative number 1/2 of your height*/
  8.     margin-left: -175px; /*set to a negative number 1/2 of your width*/
  9.     border: 2px solid #2982C6;
  10.     background-color: #FFF;
  11.     text-align: center;
  12. }