Axel Richter: divs nebeneinander ausrichten

Beitrag lesen

Hallo:

So gehts:

So auch:

<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>DivTest 1.0.1</title>
<style type="text/css">
<!--
 body {margin:0;}
 div {font-family:Verdana; font-size:10pt; position:relative; border:solid 1pt #7F7F7F;}
-->
</style>
</head>
<body>
 <div style="position:relative; width:300px;">
  <div style="position:relative; width:100px;">Element 1</div>
  <div style="position:absolute; width:100px; top:0; left:100px;">Element 2</div>
  <div style="position:absolute; width:100px; top:0; left:200px;">Element 3</div>
 </div>
</body>
</html>

Gruß

Axel