<div class="htmlarea"> <textarea id="runcode1168"> <style type="text/css"> #box{width:600px; height:400px; border:1px solid red;} #box{position:static; *position:relative; display:table; *display:block; } #box-middle{position:static; *position:absolute; display:table-cell; *display:block; *top:50%; vertical-align:middle; *vertical-align:auto;} #box-inner{position:relative; top:-50%; background-color:blue; margin:0 auto; width:200px; height:100px;} </style> <div id="box"> <div id="box-middle"> <div id="box-inner">content</div> </div> </div> </textarea><br><input onclick="runEx('runcode1168')" type="button" value="运行代码"> <input onclick="doCopy('runcode1168')" type="button" value="复制代码"> <input onclick="doSave(runcode1168)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div> <br>终于见识了这个变态的IE7,象雾象雨又象风,IE系列的CSS hack: * html它认;Firefox的CSS hack: html>body、#id[id]、html[xmlns] div这样的东东它也认,教我说它什么好呢! <br>最终通过无敌 * 解决了它!