Devi usare la regola css float
http://www.html.it/pag/42450/float-e-clear/
http://www.html.it/articoli/float-teoria-e-pratica-1/