<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>最終透過無敵 * 解決了它!