The CSS Height and Width Properties Pop-up Method

Test this pop-up method: Using the CSS Height and Width Properties Pop-up Method


Windows IE: OK
Windows Firefox: OK
Windows Safari: OK
Windows Opera: OK
Mac IE: OK
Mac Firefox: OK
Mac Safari: OK

BACK TO LIST OF POP-UP METHODS
BACK TO HOME PAGE



This one is pretty straightforward: Just make something a little 1-by-1-pixel dot—a white one at that—to keep it invisible, and then increase its size and put words in it to make it pop up. But you might want to be careful about Google, since rumor has it that Google isn't crazy about making things invisible by whitening and miniaturization, any more than they like hidden links whose text is background color.

You may use this technique to present pop-up ads, or to solicit subscribers to your ezine, newsletter, or RSS feed. Use if for reminders, warnings, or statistics displaying. You may get survey participants, ask for donations, or use it for political fund raising. You can even inform visitors about some of your other related websites. There is no end to the types of purposes that pop-ups can be used for.

If your pop-up is about thumbnail enlargement, check out What is the easiest way to do thumbnail image enlargement windows? If you want thumbnail enlargement without clicking, check out Making an Image Enlarge When The Mouse Cursor Is Hovering Over It.



THE CODE



<html>
<head><title>The CSS Height and Width Properties Pop-up Method</title>

<script type="text/javascript">

function show(){
e=document.getElementById('o')
e.style.height='50px'
e.style.width='80px'
e.innerHTML='pop-up!'
e.style.backgroundColor='#ccc'
e.style.padding='10px'}

function hide(){
e=document.getElementById('o')
e.style.height='1px'
e.style.width='1px'
e.innerHTML=''
e.style.backgroundColor='#fff'
e.style.padding='0px'}

</script>
</head>

<body>

<IMG SRC="doorknob.gif" WIDTH=50 HEIGHT=50 BORDER=0 onMouseOver="javascript:show();return true" onMouseOut="javascript:hide();return true">

<div id="o" style="position:absolute; left:200px; top:100px; width:1px; height:1px;background-color:#fff"></div>

</body>
</html>