title: can't add text over image dynamically
body: <p>I'm designing mobile webpage using HTML5+Javascript. I added a image dynamically thro' javascript. But when i tried to set a text over that image dynamically, it doesn't work.</p>
  
  <p>I want the text to be appear over the image.
  My code is;</p>
  
  <pre><code>  &lt;script&gt;
    for(var i=0;i&lt;5;i++) {
    var ele = document.getElementById('container');
    var table = document.createElement('table');
    table.className = 'c1';
    var tr = document.createElement('tr');
    var td = document.createElement('td');
    /* image added dynamically */
    var img = new Image();
    img.src = "Images/car.jpeg";
    img.className = 'c3';
    var txt = document.createTextNode('IE8');
  
    td.appendChild(img);
    img.appendChild(txt);
    tr.appendChild(td);
    table.appendChild(tr);
    ele.appendChild(table);
    }
  
    &lt;style&gt; .img{height:50px;width:50px;}
    .c1 {height:60px; width:100px;} 
    &lt;/style&gt;
    &lt;body id='container'&gt;&lt;/body&gt;
  </code></pre>
  
  <p>I have tried by adding a div component &amp; then adding text + background-image to it. It's also not working.</p>