position:fixed
Der Internet Explorer kann mit der Angabe
position:fixed nichts anfangen (angeblich soll er sie aber ab Version 7 unterstützen).
Es gibt aber eine Möglichkeit dem Internet Explorer (ab Version 5) diese Angabe beizubringen - mittels eines vorhandenen Bugs, der
alle
position:absolute und
position:relative Angaben zu
position:fixed macht.
Dazu verwendet man am Besten
Conditional Comments.
Diese Seite ist so realisiert worden. Der Quelltext (gekürzt) ist folgender:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Seitentitel</title>
<style type="text/css">
html, body {
margin: 0px;
height: 100%;
}
div.scrollbereich {
font-size: 10pt;
color: #000000;
}
div.menue {
position: absolute;
left: 15px;
top: 15px;
z-index: 1;
}
html>body div.menue {
position: fixed;
}
div.inhalt {
margin-top: 320px;
float: right;
width: 1000px;
}
</style>
<!--[if lt IE 7]>
<style type="text/css">
html, body {
height: 100%;
overflow-y: hidden;
}
div.scrollbereich {
height: 100%;
width: 100%;
overflow: auto;
}
div.inhalt {
position: static;
}
</style>
<![endif]-->
</head>
<body>
<div class="scrollbereich">
<div class="menue">
hier kommt das Menü hin
</div>
<div class="inhalt">
hier kommt der Inhalt hin
</div>
</div>
</body>
</html>