Last active
August 29, 2015 14:01
-
-
Save Lif3line/18532febd51195f26343 to your computer and use it in GitHub Desktop.
Pop up box for displaying messages over a page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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