I have two divs, like the image attached. Mi problem is that div2 didn't go under div1 (when div1 finish), as shown in image1, but remains in column (like the second image attached).

div1 css is:
width: 391px;
height: 380px;
float: left;
margin-right: 10px;
while div2 css ishas no css (i don't know what to insert).
How can i do?
Thanks, Mattia
Assuming your markup is
<div id="div1">...</div>
<div id="div2">...</div>
You have to do absolutely nothing, since if div2 has no style applied then the whole layout will be like that on figure 1
see fiddle: http://jsfiddle.net/qAqv3/
A div can have only one width and only one height, so it can only be a rectangle. You could insert your div1 into div2, and set the content of div2 (including div1) with float:left .
Here is a demo : http://jsfiddle.net/DX2vJ/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With