This is how to do that.
1. make a new css document.
2. Then place the following code in it.
#main-div {
position: absolute;
top: 50%;
left: 50%;
width: 70em;
height: 50em;
margin-top: -25em; /*always take 1/2 from the size of the height, they have to be negative*/;
margin-left: -35em; /*always take 1/2 from the size of the width, they have to be negative*/
}
Then place in your html: the following code.
<div id="main-div"> content </div>
This wil place the div box in the center of the screen, works mostly for any resolution depends on the size of your div box.
Hope this helped some people.
















