Hello
A bit tricky cross browser
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Test</title>
<!-- saved from url=(0022)http://www.domain.com/ -->
<style media="all" type="text/css">
<!--
*{padding:0;margin:0;}
html, body{
height:100%;
overflow:hidden;
}
.wrapper{
height:100%;
overflow:auto;
position:relative;
z-index:2;
}
.content{
border:1px dashed gray;
height:1500px;
}
.popup{
position:absolute;
border :1px solid blue;
width:300px;
left:50%;
top:150px;
margin-left:-150px;
padding:5px;
}
-->
</style>
</head>
<body>
<div class="wrapper">
<div class="content">
<p>
Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>Test Text <br>
</p>
</div>
</div>
<div class="popup"><p>Box that should have a fixed position and be centered.</p></div>
</body>
</html>
Bookmarks