I have a DIV being created with Javascript that a slideshow is going into. Everything works great, execpt the positioning of this DIV. I want it to be further down the page, but no matter where I put the document.write that creates it, the DIV remains at the top in Firefox & Chrome. For IE, it doesn’t display unless the code is at the top of my script. Any suggestions or fixes?
writeButton("","/page1.html","light_box_b01",206,298,"","",0);
writeButton("","/page2.html","light_box_b02b",206,84,"","",0);
document.write('<div id="fadeshow1" style="margin-top:5px; margin-bottom:5px;"></div>')
writeButton("","/page3.html","light_box_b03b",206,89,"","",0);
writeButton("","/page4.html","closeout",206,78,"","",0);
document.write("<td><img src=\""+loc+"Separator02"+gtype+"\" alt=\"\" width=\"206\" height=\"35\"></td>");
document.write('<div id="fadeshow1" style="margin-top:5px; margin-bottom:5px;"></div>')
writeButton("","/page5.html","p_ClipFrame",206,20,"Clip Frames","",0);
I made an example that adds an image to div on the page. One uses jQuery the other just plain JavaScript. You can see it in action here: http://jsfiddle.net/j6dZf/
This is the jQuery Version