Here is the solution:
#wrap { width:730px; overflow:auto; padding:20px; }
#div1 { width:500px; float:left; height:200px; margin-bottom:20px; }
#div2 { width:237px; float:left; clear:left; height:150px; margin-right:20px; }
#div3 { width:237px; float:left; height:170px; }
#div4 { width:200px; float:right; height:500px; }
Check out the live demonstration: http://jsfiddle.net/simevidas/MNjyg/show/
Update:
#wrap { overflow:auto; }
#div1{ background:yellow; width:70%; float:left; }
#div2{ background:red; width:35%; float:left; clear:left; }
#div3{ background:green; width:35%; float:left; }
#div4{ background:blue; width:30%; float:right; }
Live demo of the updated version: http://jsfiddle.net/simevidas/Cm7b7/6/
Note: The widths of the 4 DIVs are specified in percentages. It is crucial not to set margins, padding, or borders directly on these DIVs as it could disrupt the percentage calculations. If padding and borders are required, apply them to child elements instead.