Pop-ups suck.
The good thing is you do not see many of them more. This is because the browser admit suction and most likely spam or advertising, so they block pop-ups. Create a pop-old way is to force open a new browser window, in the current browser window. So this is the browser blocks. But if you really need to use the pop-up window something useful instead of garbage? That happened to me one day. Clients wanted their web page pop-up window Merry Christmas.
Popup know I can not use the old method, I went searching. I know this will be very easy to use CSS to a floating DIV over the site, it creates a pop-up content effect. The question is how you close a pop-up, it’s open? The JavaScript will need this. Check out the demo, I set up, which shows how to set the CSS pop-up page load or by clicking on the link to open; no matter how kind of Javascript allows you to have a “Close” button to close or hide the pop-up. And then continue to read the code and downloaded files.

If you check out the source code of the HTML file, you will see the following in the body. The “one size fits all” is the pop-up, which helps to distinguish it from the back of a transparent black background from the rest of the content on the results page. In “popUpDiv” is that you put your pop-up content.



<div id="blanket" style="display:none"></div>




<div id="popUpDiv" style="display:none">
<a href="#" onclick="popup('popUpDiv')" >Click to Close CSS Pop Up</a>
</div>


<a href="#" onclick="popup('popUpDiv')">Click to Open CSS Pop Up</a>

If you want to load in the pop-up page loads, the less your body tag.

<body onload="popup('popUpDiv')">

Here is the CSS for style and pop-blanket effect of DIV. You will see that I put a blanket effect close the IE browser, because it does not seem to support the “opacity” (big surprise).

#blanket {
background-color:#111;
opacity: 0.65;
*background:none;
position:absolute;
z-index: 9001;
top:0px;
left:0px;
width:100%;
}

#popUpDiv {
position:absolute;
background:url(pop-back.jpg) no-repeat;
width:400px;
height:400px;
border:5px solid #000;
z-index: 9002;
}

There are links to HTML files, JavaScript files to make some magic happen. I intend to make an existing presentation so that you can play with it and make your own. enjoy!
Automatic screen pop-up window centered. To adjust this as you pop open the JavaScript file. Digital height and width you’ll see: window_width = window_width / 2-200; // 200 is half the width of the pop-up
Change the “200”, so it is half your width; the height of the line to do the same declaration.