In this post you'll get more information about the usage of DIVs. Maybe a little more advanced. You can try it yourself - just change the code inside the html and css boxes. The result appears in the output box.
Interactive Demo
CSS Float
With the css float you can push a DIV to the right or left.By default it will move as far to the right or left as possible.
OUTPUT:
floated DIVs inside a parent DIV:
OUTPUT:
If you float DIVs after each other, they will float next to each other. If there is no more room they will move to the next line.You can see it if you change the width of #box.
OUTPUT:
By default the elements after a floated DIV flow around it while the elements before the floated DIV are not affected.
If you float a DIV to one side, a following text flows around it, to the other side.