I have an array of div tags that hold images (and captions):
array
1 <div style="padding:5px;border:solid black 1px;width:320"><img src="http://local/photos/3645/thumb/320/tj3645_070206_134731_160020_tn320.JPG" id="tnImg160020_320"></div>
2 <div style="padding:5px;border:solid black 1px;width:490"><img src="http://local/photos/3645/thumb/490/tj3645_060406_025416_151917_tn490.JPG" id="tnImg151917_490"></div>
3 <div style="padding:5px;border:solid black 1px;width:170"><img src="http://local/photos/3645/thumb/170/tj3645_061006_042104_153889_tn170.JPG" id="tnImg153889_170"></div>
Then I have a variable that contains the text of an article. The array of images is generated on the fly from settings in a database. The plan is to allow the users to decide where they'd like to position the images (top, right, left, bottom, middle, etc.)
My questions is, what's the best way to wrap the text around the these images? The whole content is currently wrapped inside a main container div:
<div id="mainDiv"><div>Images1<div><div>Images2<div><div>Images3<div> Text</div>
Thanks!