2010-04-30 38 views
0

如何對齊IE8中div中心的按鈕。工作正常IE7但不是在IE8在div問題中IE8對齊

<div id="dPopupFooter" style="background-color: #d9d9d9; position: absolute; z-index: 5; 
bottom: 0px; width: 100%; height: 30px; border-top: solid 1px #acacac; text-align: center; padding-top: 3px;"> 

      <table><tr><td><xrx:CustomButton id="btnClose" runat="server" OnClientClick="ClosePopup();" /></td></tr></table>   

    </div> 

回答

0

CSS(風格塊或樣式表):

#dPopupFooter table tr td { 

text-align: center; 

} 

是的,它的工作原理,你就不能看到它。問題是你的表沒有100%的寬度:

#dPopupFooter table { 
    width:100% 
} 
+0

我給了文本對齊:中心style..it不工作.. – xrx215 2010-04-30 19:48:35

+0

見上面我的編輯。 – 2010-04-30 20:37:57

+0

嗨,我已經給了上面提到的CSS,但按鈕的寬度是擴展整個div部分。 – xrx215 2010-05-03 16:10:56