Hallo
Habe folgenden Code
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
<!--
* { margin: 0; padding: 0; }
body {
width:983px;
margin:auto;
text-align:center;
background:#303030;
font-family : Verdana;
font-size : 12px;
color : #ccc;
}
//-->
</style>
</head>
<body class="">
<div style="text-align:left;position:relative;">
<div style="position:absolute;left:0px;top:0px;width:651px;height:100%">
<div style="z-index:1;background-image: url('../img/rand_links.gif');background-repeat: repeat-y;position:absolute;left:0px;top:0px;width:597px;height:100%;"></div>
<div style="z-index:1;background-image: url('../img/rand_rechts_mitte.gif');background-repeat: repeat-y;position:absolute;right:0px;top:0px;width:54px;height:100%;"></div>
<div style="z-index:2;background-image: url('../img/rand_oben.gif');background-repeat: no-repeat;position:absolute;left:0px;top:0px;width:597px;height:2px;"></div>
<div style="z-index:2;background-image: url('../img/rand_rechts_oben.gif');background-repeat: no-repeat;position:absolute;right:0px;top:0px;width:54px;height:352px;"></div>
<div style="z-index:2;background-image: url('../img/rand_rechts_unten.gif');background-repeat: no-repeat;position:absolute;right:0px;bottom:0px;width:54px;height:31px;"></div>
<div style="z-index:2;background-image: url('../img/rand_unten.gif');background-repeat: no-repeat;position:absolute;left:0px;bottom:0px;width:597px;height:6px;"></div>
<div style="z-index:2;position:relative;left:0px;top:0px;width:597px;height:100%;padding:8px">
Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt
Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt
Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt
Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt Inhalt
</div>
</div>
</div>
</body>
</html>
Sobald ich im ersten Div das "position:relative;" einfüge um den ganzen weiteren Kram zentrieren zu können oder im Textfluß zu benutzen, werden alle anderen Elemente falsch positioniert.
Ist das "position:relative;" weg sieht meine gebaute Box so aus wie sie aussehen soll. Steht aber dann auch ganz oben links und nicht wie im Beispiel in der Mitte.
Sieht evtl. jemand nen Fehler oder nen Grund warum sich alles verschiebt wenn ich die Box weiter verwenden will?
##Edit
Hat sich erledigt