<div class="htmlarea"><textarea id="runcode41592"> <title>Div上下居中-www.51windows.Net</title> <meta name="keywords" content="51windows.Net"> <meta http-equiv="content-type" content="text/html; charset=gb2312"> <div style="position: absolute; top: 200; left: 0; width: 300; height: 200;border: 1 solid #C0C0C0;"> <div style="border: 1 solid red;position: absolute;top:expression((this.parentElement.offsetHeight-this.offsetHeight)/2);left:expression((this.parentElement.offsetWidth-this.offsetWidth)/2);"></div> </div></textarea></div>