I have following setup:
html:
var sum=0; $('#holder img').each( function(){ sum += $(this).width(); }); $('#holder > div').width( sum ); //alert(sum);
this should do the trick ..
The float to the images, you can apply it with css
#holder img{float:left;}