I have the following JSFIDDLE that i am working on to show an overlay. However, when shown it has a border around the overlay and seems to create a larger area therefore placing scroll bars onto the page and i can not figure out why that is?
the js code is:
$('.link').live('click',function(event){
event.preventDefault();
var $this = $(this),
$overlay = $('#overlay');
$overlay.fadeIn();
});
$('#overlay').live('click',function(event){
event.preventDefault();
var $this = $(this),
$overlay = $('#overlay');
$overlay.fadeOut();
});
The HTML is:
<div id="overlay"><span><br /><br /><br /><br /><br /><br /><br />Click again to close overlay</span></div>
<div id="content">
This is just a demo of this overlay
<a class="link">Click HERE to show overlay</a>
</div>
And the CSS is:
#overlay {
position:absolute;
width:100%;
height:100%;
background-color:rgba(255,255,255,0.8);
text-align:center;
z-index:999;
display:none;
}
#overlay span {
text-align:center;
z-index:1001;
}
body {background-color: #000; color: #fff;}
What am i missing (or need to take out)? Thanks!