Position relative positions the element relative to where it would normally be. The element is not taken out of the flow of the document so if you move one it will affect the positioning of the elements after it.
Position absolute positions the element relative to the containing block. The elements are taken out of the flow of the document so moving one does not affect anything else on the page.
Example using relative positoning
If you are using position relative, elements are moved with top and left.
div.fyrkant
{
height: 100px;
width: 100px;
position:relative;
}
div.a
{
background-color: #b5e274;
}
div.b
{
background-color: #e2d974;
left: 100px;
top:-100px;
}
div.c
{
background-color: #e2b074;
top: -100px;
}
div.d
{
background-color: #e27e74;
top: -200px;
left: 100px;
}
If you don't want use top and left, you should investigate using floats and clears for this problem.
Example using floats
The best cross-browser solution is going to involve adding markup to your html. Since what you want is two rows of blocks, surround each row with a div.
<div class="page1">
<div class="row">
<div class="a fyrkant">test a
</div>
<div class="b fyrkant">test b
</div>
</div>
<div class="row">
<div class="c fyrkant">test c
</div>
<div class="d fyrkant">test d
</div>
</div>
</div>
Then add to your css
div.fyrkant
{
height: 100px;
width: 100px;
}
.row {overflow:hidden;zoom:1;}
.a, .b, .c, .d { float: left; }
The overflow:hidden clears the floats so the .row contains the blocks. If you do not have that the rows have no height and the rows will be on the same line. The overflow:hidden does not work in ie6 but zoom:1 will (invokes haslayout)