Good day to you all,
I working on a directory list images and I’m having problem displaying the popup div , when an image is clicked, in the middle of the window.
My main problem is that it’s not all the images that as the same size.
Here anexample of my images linked to my popup up.
<?PHP
// add it to portrait list
$portrait .= "<a onmouseover=this.style.cursor=\"pointer\" ' ' onclick=\"document.getElementById('".$value."').style.display = 'block' \" ><img src=\"".$directory."/".$value."\" width=\"50px\" class=\"imag\"></a>\n";
$portrait .= "<div id=\"".$value."\" style=\"display: none; position: absolute; margin-left:auto; margin-top:auto; padding: 10px; background-color: #ffffff; text-align: justify; font-size: 12px;\">";
$portrait .= "<img src=\"".$directory."/".$value."\" name=\"".$value."\"/><br />".$value."<br/><div style=\"color:#000000; background-color:#ffffff; font-size:14px; text-align:center;\" onmouseover=\"this.style.backgroundColor='#cccccc'; this.style.cursor='pointer';\" style='font-size: 12px; ' onfocus='this.blur();' onmouseout=\"this.style.backgroundColor='#FFFFFF';\" onclick=\"document.getElementById('".$value."').style.display = 'none' \" ><b>Fermer</b></div></div>";
}
//...
?>
Thanks!