Stefan: layout + div

Beitrag lesen

Moin,

du mußt die nebeneinander liegenden Container absolut positionieren und den genauen Startpunkt festlegen. Die Innenabstände habe ich mal rausgenommen, die bewirken hier eh nichts. Ansonsten habe ich mir das Ganze nicht so genau angeschaut aber ich denke Du wirst noch viel Spaß beim basteln haben.

So funktioniert auf jedenfall das was Du haben wolltest:

<html>
<head>
 <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
 <div class="header">
  test<br />
 </div>
b<div class="nav">
  test2<br />
 </div><div class="test">
    test3<br />
  </div>
  </body>
</html>

body, div {
  margin: 0px 0px 0px 0px;
 }
  div.header{
  position:relative;
  top: 0px;
  left: 0px;
  height: 150px;
  width: 100%;
  background-color: green;
  float: left;
  z-index: 10;
 }
 div.nav{
  position:absolute;
  top: 150px;
  left: 0px;
  height: 100%;
  width: 150px;
  background-color: red;
  z-index:5;
 }
 div.test{
  position:absolute;
  top: 150px;
  left: 150px;
  height: 100%;
  width: 100%;
  background-color: #3366ff;
  z-index:1;
 }

Viele Grüße,
Stefan