Peuplarchie
09-01-2008, 05:24 PM
Good day to you all,
I'm working on a piece of code which display an image and when you click on it a full size image appears on a css box.
I was wondering how can I center it on the screen, knowing the size will be different for each....
<img src="Web/ThePonder/The Ponder.png" width="160" onmouseover='this.style.cursor="pointer" ' onfocus='this.blur();' onclick="document.getElementById('Ponder').style.display = 'block' " />
<div id='Ponder' class='Ponder' style='display: none; position: absolute; margin: 0px auto -1px auto; border: dashed black 1px; padding: 10px; background-color: rgb(255,255,225); text-align: justify; font-size: 12px; ' onfocus='this.blur();' onclick="document.getElementById('Ponder').style.display = 'none' " onmouseover='this.style.cursor="pointer" '>
<img src="Web/ThePonder/The Ponder.png" width="500" />
<br />
</div>
If someone can help me understand how I can do this.
Thanks !
I'm working on a piece of code which display an image and when you click on it a full size image appears on a css box.
I was wondering how can I center it on the screen, knowing the size will be different for each....
<img src="Web/ThePonder/The Ponder.png" width="160" onmouseover='this.style.cursor="pointer" ' onfocus='this.blur();' onclick="document.getElementById('Ponder').style.display = 'block' " />
<div id='Ponder' class='Ponder' style='display: none; position: absolute; margin: 0px auto -1px auto; border: dashed black 1px; padding: 10px; background-color: rgb(255,255,225); text-align: justify; font-size: 12px; ' onfocus='this.blur();' onclick="document.getElementById('Ponder').style.display = 'none' " onmouseover='this.style.cursor="pointer" '>
<img src="Web/ThePonder/The Ponder.png" width="500" />
<br />
</div>
If someone can help me understand how I can do this.
Thanks !