Align div elements next and under each other

Viewed 93005

i want to align 4 div boxes so that they are in a 2x2 layout like this

1 2
3 4

My code looks like this

<div style="width:300px;height:300px;float:left;">    DIV 1    </div>

<div style="width:300px;height:300px;float:left;">    DIV 2    </div>

<div style="width:300px;height:300px;clear:left;">    DIV 3    </div>

<div style="width:300px;height:300px;float:left;">    DIV 4    </div>

which produces the following layout:

1 2
3
4

Can someone help me with this?

3 Answers
Related