This tutorial will guide you create a simple popup based on CSS and Javascript
1. Create a simple div
HTML
<div id="overlayContent" style="display:none;z-index:110;width:100%;position:absolute;left:0;top:25;height:200px;"> </div>
here , make sure you put z-index to a value , display to none and position as absoulte.
2. Write Open PopUP and Close PopUp in javascript
Javascript
// for popup Open
function popupwindowOpen()
{
document.getElementById('overlayContent').style.display = "block";
}
// for popup close
function popupwindowClose()
{
document.getElementById('overlayContent').style.display = "none";
}
That’s all………. this is a simple popup . you can add extra features to it..ex:apply CSS
and it will look good.





Hello Sreejith nice post