What's the proper workaround for creating a div with a table in it with images in the table?
Posted
by Noor
on Stack Overflow
See other posts from Stack Overflow
or by Noor
Published on 2010-04-22T17:14:45Z
Indexed on
2010/04/22
17:33 UTC
Read the original article
Hit count: 223
I want this:
<div id="display">
<div id="slideshow1">
<table cellspacing=0><tr><td style="height:200px;padding:0;vertical-align:middle">
<img ... />
</td></tr></table>
</div>
</div>
And I'm using this:
var thelistt = localStorage.getItem('thelist')
var trt = document.createElement("div");
trt.setAttribute("Id","slideshow1");
trt.className="pics";
$('#display').append(trt);
var tble = document.createElement("table");
tble.setAttribute("cellspacing","0");
tble.innerHTML = "<tr><td style='height:200px;padding:0;vertical-align:middle'>";
$('#slideshow1').append(tble);
trt.innerHTML += thelistt;
This creates a div, then a table, closes the table, then images, then closes div..
Isn't there a smoother way to not do all this, if someone'd take a look at my current code i''m sure you'd get a good laugh :
http://hem.bredband.net/noor/bildspelet3.html
(you need to click on edit and put in two or more urls directly to images)
© Stack Overflow or respective owner