isabel: relatives Positionieren

Beitrag lesen

Liebe Leute,

mal wieder streß mit CSS. Ich will geren das das blaue Div sich automatisch unterr das gelbe Div ,setzt und dachte, das das mit relativer Positioniereung geht??
So wie ich das mache aber nicht?

Wer kann mir helfen?

Grüße
ISabel

<html>
<head>

<style type="text/css">
<!--
.green{position:absolute; border:1px solid black; width:500px; height:500px; background-color:green;}
.top { position:absolute; top:100px; left:200px; width:200px; height:100px;background-color: yellow;}
.blue{ position:relative; height:100px; width:100px; border:1px solid black; background-color: blue;}

-->
</style>

</head>

<body>
<div class="green">

<div class="top">
 </div>

<div class="blue">

</div>

</div>
</body>
</html>