views:

157

answers:

1

How to align the the button in center of div in IE8. Works fine in IE7 but not in 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>
A: 

CSS (in style block or stylesheet):

#dPopupFooter table tr td {

text-align: center;

}

Yes, it works, You just can't see it. The problem is your table does not have 100% width:

#dPopupFooter table {
    width:100%
}
Diodeus
i had given text align: center in style..it is not working..
xrx215
See my edits above.
Diodeus
Hi I had given the above mentioned css but the button width is extending whole of div section.
xrx215
Set it to a pixel value instead of 100%
Diodeus
yes i gave pixel value but the button is expanding from left to right instead of center alignment
xrx215