Np. kiedy ustawiam górny margines dla diva pierwszego, to div ten "schodzi w dół", ale chowa się pod diva drugiego. A ma być tak, by div drugi przesunął się o wartość ustawionego marginesu.
Tak to wygląda:
Kod: Zaznacz cały
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
div.caly
{
width: 300px;
height: 500px;
border: 0;
background: green;
}
div.pierwszy
{
width: 300px;
border: 0;
background: red;
position: relative;
top: 15px;
}
div.drugi
{
width: 300px;
border: 0;
background: blue;
position: relative;
top: 10px;
}
</style>
</head>
<body>
<div class="caly">
<div class="pierwszy">
pierwszy<br>
pierwszy<br>
pierwszy<br>
pierwszy<br>
pierwszy<br>
</div>
<div class="drugi">
drugi<br>
drugi<br>
drugi<br>
</div>
</div>
</body>
</html>