Continuo a sbagliare qualcosa:
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
<style type="text/css">
#coprente {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent url(overlay.png) repeat;
z-index: 30; /* o cmq il numero più alto tra quelli degli altri z-index presenti */
}
#box_popup_che_deve_comparire {
position: absolute;
top: 50%;
left: 50%;
width: 100px;
height: 100px;
margin-left: -50px; margin-top: -50px; /* a cui sottrarre la metà di AA e BB */
}
</style>
<script language="javascript">
// Parametro vero -> true = visibile; false = invisibile
function mostra(vero)
{
document.getElementById('box_popup_che_deve_comparire').style.display=block;
}
else
{
document.getElementById('box_popup_che_deve_comparire').style.display=none;
}
</script>
</head>
<body>
<div id="coprente">
<div="box_popup_che_deve_comparire">
... contenuto del box ...
[url="#"]apri div[/url]
</div>
</div>
</body>
</html>