Witam,
chciałbym wycentrować diva oraz sprawić żeby jego zawartość wyświetlała się "nad" treścią. Mam na myśli tu wyskakujące okno, które pojawia się na środku. Zrobiłem to za pomocą position:absolute; ale wtedy div ucieka do lewej strony.

o to kod:

Kod
<!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" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style/style.css" rel="stylesheet" type="text/css" />

<!-- ALWAYS ON TOP FLOATING LAYER POP-UP -->

<script language="JavaScript" type="text/javascript">
<!-- Copyright 2003, Sandeep Gangadharan -->

<!--
var y1 = 150;   // change the # on the left to adjuct the Y co-ordinate
(document.getElementById) ? dom = true : dom = false;

function hideIt() {
  if (dom) {document.getElementById("layer1").style.visibility='hidden';}
}

function showIt() {
  if (dom) {document.getElementById("layer1").style.visibility='visible';}
}

function placeIt() {
  if (dom && !document.all) {document.getElementById("layer1").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)) + "px";}
  if (document.all) {document.all["layer1"].style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - (document.documentElement.clientHeight-y1)) + "px";}
  window.setTimeout("placeIt()", 10); }
// -->
</script>

</head>
<center>
<body onLoad="placeIt(); showIt()">
<table width="716" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="411" height="77" valign="top"></td>
    <td width="305"></td>
    </tr>
</table>
<table width="716" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="716" height="161" valign="top"><!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="716" height="161" id="banerSi" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="banerSi.swf" /><param name="quality" value="best" /><param name="scale" value="noscale" /><param name="wmode" value="opaque" /><param name="bgcolor" value="#ffffff" /><embed src="banerSi.swf" quality="best" scale="noscale" wmode="opaque" bgcolor="#ffffff" width="716" height="161" name="banerSi" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object></td>
  </tr>
</table>
<div id="layer1" align="center" style="width: 410px; min-width: 410px; margin: 0 auto; position:absolute;">
  <div align="center" style="text-align: center; background-color:#E5F298; padding:3px; border:1px solid #306400;">
    <span class="style1" style="cursor:pointer; float:right;" onclick="javascript:hideIt()">&nbsp;X&nbsp;</span>
     <br />
<span class="style1">Tu jest przykładowy tekst <br />
</span></div>
   </font>
</font>
</div>
<table width="716" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="716" height="32" align="center" valign="middle" style="background:url(layout/stopka.jpg); background-repeat:no-repeat;"><!--DWLayoutEmptyCell-->&nbsp;</td>
  </tr>
</table>
</body>
</center>
</html>


prosiłbym o pomoc!!

Dzieki