An Image inside a dynamically created div tags
<p>What is required is to dynamically create six div tags using Javascript, that will resize with the width of the window( either computer, iphone,ipad, Blackberry etc). that task has been succesfully achieved. The next task is to place an image in each of the created div tag, <strong>Remember the divs are created dynamically and the image has to be clickable.</strong> I have a folder containing the images. </p>

<p><strong>Please help am new at this</strong>.</p>

<p>*<em>Note:The Images should resize as the divs resizes</em>
Here is the code for the dynamically created div tags. Please In details illustrate how best can i achieve this.</p>

<pre><code>function DynamicDiv() {  
  for( var i = 0; i &lt;= 5; i++){
    var dynDiv = document.createElement("div");
    dynDiv.className = "blocks";
    document.body.appendChild(dynDiv);
  }
}  
</code></pre>
