Hallo,
ich habe da ein kleines Problem. Ich denke, daß es mit der Positionsangabe zusammenhängt, bin mir aber nicht sicher.
Ich habe 1 DIV als Container (mit 25px Padding), darin 4 weitere jeweils überlappende DIV's.
Allerdings wächst mit jedem überlappenden DIV der Abstand zum Ende der Container-DIV's.
Was mache ich falsch? :neutral:
ich habe da ein kleines Problem. Ich denke, daß es mit der Positionsangabe zusammenhängt, bin mir aber nicht sicher.
Ich habe 1 DIV als Container (mit 25px Padding), darin 4 weitere jeweils überlappende DIV's.
Allerdings wächst mit jedem überlappenden DIV der Abstand zum Ende der Container-DIV's.
Was mache ich falsch? :neutral:
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
<style type="text/css">
<!--
div {
padding:25px;
}
-->
</style>
</head>
<body>
<!-- contentbox --><div style="background-color:#030">
<div style="width:400px; background-color:#069; position:relative;">
<ul>
<li>eintrag 1</li>
</ul>
</div>
<div style="width:400px; left:200px; top:-25px; background-color:#0CF; position:relative;">
<ul>
<li>eintrag 2</li>
</ul>
</div>
<div style="width:400px; top:-50px; position:relative; background-color:#069;">
<ul>
<li>eintrag 3</li>
</ul>
</div>
<div style="width:400px; left:200px; top:-75px; position:relative; background-color:#0CF;">
<ul>
<li>eintrag 4</li>
</ul>
</div>
<!-- ende contentbox --></div>
</body>
</html>