Is there any simple way to absolutely center the Div floating layer? the answer is to use CSS to write the style sheet . The following wording is compatible with IE series browser and Firefox browser.
detailed explanation, look directly at the style:
Span style= "LINE-HEIGHT:2; font-size:16px; Font-family:simsun; " > width:600px;height:300px;
Display:block;
Position:absolute;
top:50%;
left:50%;
margin-left:-300px;
margin-top:-150px;}
Padding:10px;color: #FFFFFF; These words are decorative things are not the core;
width:600px;height:300px; Div Total has a wide-height bar, according to your specific situation set;
Display:block; The div is displayed as a block-level element;
position:absolute;top:50%;left:50%;margin-left:-300px; margin-top:-150px; The focus of this paragraph, I think the smart friends are clear.
is to definitely position the div layer, and of course you should let him be relative to the body tag. margin-left:-300px; This value is half the width of the Div, margin-top:-150px; is half the height of the div.
Use CSS style sheet method to position Div floating Layer Absolutely center