Hello, I have been having this issue for over a week and I am about to pull my hair out. It is not centering for me. Here's what I have right now for the css (I've searched for solutions and tried just about every one of them available on the internet, this is what I have so far for it.)
And this is how is it used. The popup is off to the left.
Any help and suggestions is greatly appreciated!
Code:
div.ModalPopup2
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
font-style: normal;
background-color: #544d3d;
position: fixed; /* set z-index higher than possible */
z-index: 10000;
color: Black;
border-style: solid;
border-color: #999999;
border-width: 1px;
top: 50%;
left: 50%;
width: auto;
height: auto;
margin-top: -9em;
margin-left: -23em;
}
And this is how is it used. The popup is off to the left.
Code:
<div id="divLogout" align="center" class="ModalPopup2" runat="server" style="display: none;">
<table style="background-color: #F6F3EE; border: solid 2px #000000;" cellpadding="2" cellspacing="2">
<tr>
<td align="center">
<span style="color: Red; font-weight: bold;">
Are you sure you want to log out?<br />
Your data will not be saved.</span>
</td>
</tr>
<td align="center">
<asp:Button ID="btnYes" UseSubmitBehavior="false" CssClass="button" runat="server" CausesValidation="false"
Text="Yes" OnClick="btnYes_Click" Height ="30px" Width= "85px" />
<asp:Button ID="btnNo" UseSubmitBehavior="false" CssClass="button" runat="server" CausesValidation="false"
Text="No" OnClick="btnNo_Click" Height ="30px" Width= "85px"/>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>
Any help and suggestions is greatly appreciated!