Skip to content

Instantly share code, notes, and snippets.

@Lif3line
Last active August 29, 2015 14:01
Show Gist options
  • Save Lif3line/18532febd51195f26343 to your computer and use it in GitHub Desktop.
Save Lif3line/18532febd51195f26343 to your computer and use it in GitHub Desktop.
Pop up box for displaying messages over a page
<div id="overlay">
<div id="messageBox"></div>
</div>
<script type="text/javascript">
function popUp(message) {
document.getElementById("overlay").style.visibility = "visible";
}
function closePopUp() {
document.getElementById("overlay").style.visibility = "hidden";
}
</script>
#overlay {
visibility: hidden;
position: absolute;
left: 0px;
top: 0px;
width:100%;
height:100%;
text-align:center;
z-index: 1000;
}
#overlay div {
width:300px;
margin: 400px auto;
background-color: rgb(120,120,120);
background-color: rgba(120,120,120,0.7);
padding:15px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment