I am using an overlay:
<div id="overlayer" class="overlayer">
<div id="board" class="board"></div>
</div>
Here are the CSS properties I have applied to it:
#overlayer
{
position:fixed;
display:none;
top:0;
left:0;
width:100%;
height:100%;
background: -moz-linear-gradient(
top,
#807980 0%,
#3d323d);
background: -webkit-gradient(
linear, left top, left bottom,
from(#807980),
to(#3d323d));
opacity:0.6;
z-index:9998;
}
#board
{
position:relative;
left:33%;
top:20%;
width:600px;
height:450px;
border-radius:15px;
background-color:white;
z-index:9999;
display:none;
}
To trigger the overlay, this script is used:
<script type="text/javascript>
$(document).ready(function(){
function overlayerOn(){
$('#overlayer').fadeIn(800);
}
function overlayerOff(){
$('#overlayer').fadeOut(800);
};
$('#fr').click(function(e){
overlayerOn();
var $br = $('#board');
$br.css('display', 'block');
});
$('#overlayer').click(function(e){
overlayerOff();});
});
</script>
However, there is a problem with the closing functionality as it closes when clicking on the div inside the overlay. Any suggestions on how to fix this? Thank you...