Dasselbe funktioniert auch ohne position:absolute mit geschachtelten float-Elementen:
HTML-Code:
<html><head>
<style type="text/css">
#container{
border:1px solid blue;
padding:0.25em;
height:1.5em;
}
#one{
float:left;
width:200px;
margin-right:15px;
border: 1px solid red;
}
#two{
float:left;
width:250px;
margin-right:15px;
border: 1px solid black;
color:white;
}
#three{
float:left;
width:300px;
border: 1px solid green;
}
#left{
float:left;
width:200px;
height:500px;
border:1px dashed blue;
margin-right:20px;
}
#main{
float:left;
border:1px solid yellow;
height:500px;
}
</style>
</head><body>
<div id="left">
Menu oder so
</div>
<div id="main">
Bla bla bla...
<div id="container">
<div id="one">Box 1</div>
<div id="two">Box 2</div>
<div id="three">Box 3</div>
</div>
<br style="clear:left"/>
bla bla bla zum Zweiten.
</div>
<br style="clear:both"/>
</div>
</body></html>
Lesezeichen