Current location: Hot Scripts Forums » General Web Coding » CSS » Css popup in center of window


Css popup in center of window

Reply
  #1 (permalink)  
Old 05-24-09, 11:46 PM
peuplarchie's Avatar
peuplarchie peuplarchie is offline
Newbie Coder
 
Join Date: Nov 2008
Posts: 64
Thanks: 1
Thanked 0 Times in 0 Posts
Post Css popup in center of window

Good day to you all,
I'm working on a css popup script.
It work, but I would like the popup to be always in the center of the window.

here is my code :

PHP Code:


     
echo "<a onmouseover=this.style.cursor=\"pointer\" ' onfocus='this.blur();' onclick=\"document.getElementById('".$value."').style.display = 'block' \" ><img src=\"".$directory."/".$value."\" width=\"50px\"></a>\n"
    echo 
"<div id='".$value."' style='display: none;  position: absolute;  text-align:left; margin: -50px -200px; margin-top:-150px; z-index:50; border: solid black 1px; padding: 10px; background-color: rgb(255,255,225); text-align: justify; font-size: 12px; '>";
    echo 
"<img src=\"".$directory."/".$value."\" /><br />".$value."<br/>";
    echo 
"<div style='text-align: right;'><a onmouseover='this.style.cursor=\"pointer\" ' style='font-size: 12px;' onfocus='this.blur();' onclick=\"document.getElementById('".$value."').style.display = 'none' \" ><span style=\"color:#000000;\">Close</span></a></div></div>"
Thanks!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup Window Issue. umarrana JavaScript 2 06-29-08 06:35 AM
creating a popup window? chrisrobertson JavaScript 1 08-18-06 11:37 AM
Replace Popup Window? aDcOoL Script Requests 2 03-04-06 04:48 PM
how do I update form, and hidden values in a form from a popup window? lordmerlin JavaScript 2 12-13-05 02:05 PM
Popup window (Novice) dgrover JavaScript 0 10-21-05 05:48 PM


All times are GMT -5. The time now is 02:22 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.