Hi guys,
I have an ImageButton control in asp.net calling a javascript function to display it in block. The elements have their own css classes, but they do not appear in the context that I gave them. I am assuming this is a problem with my css because the javascript function makes my div's appear and disappear as wanted. But just for the sake of being thorough, here is all the related markups:
The ImageButton control:
<asp:ImageButton ID="ImgBtn" runat="server" ImageUrl="~/Images/Go.gif"
OnClientClick="<script type='text/javascript'>document.getElementById('infoSharing').style.display='block';document.getElementById('fade').style.display='block';return false;</script>" />
Here are the div's that are supposed to appear in a certain style:
<div id="fade" class="black_overlay"></div>
<div id="infoSharing" class="white_content2">
<h2>BLahb blah</h2>
<p>ajfkjsdfklsjkfljalkjdfsfsaasdfasdfsdfasftjee5uteagasdfsadfBlahblahblahblah
<a href="http://www.website.com" target="_blank">here.</a></p>
<a href="javascript:void(0)" onclick="document.getElementById('infoSharing').style.display='none';document.getElementById('fade').style.display='none'">Close This Window</a>
</div>
And finally here is the CSS:
.black_overlay {
display: none;
position:absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.8;
opacity: .80;
filter: alpha(opacity=80);
}
.white_content2 {
display: none;
position: absolute;
top: 20%;
left: 20%;
width: 60%;
height: 15%;
padding: 10px;
border: 5px solid black;
background-color: white;
z-index: 1002;
overflow: auto;
}
.
#infoSharing {
text-align: center;
}
#infoSharing h2 {
color: #000000;
}