Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7657173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:57:27+00:00 2026-05-31T12:57:27+00:00

I have a DIV being created with Javascript that a slideshow is going into.

  • 0

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);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:57:28+00:00Added an answer on May 31, 2026 at 12:57 pm

    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/

    // example 1: using normal javascript
    
    // create a variable with the image url (not required)
    var src = "http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Golden_retriever_eating_pigs_foot.jpg/170px-Golden_retriever_eating_pigs_foot.jpg";
    
    // remember id's must be unique per page
    // here i'm taking the container div and saving it
    var container = document.getElementById("container");
    
    // here i create a new image, set the src attribute and append to container
    var img = new Image();
    img.src = src;
    container.appendChild(img);
    

    This is the jQuery Version

    // example 2: using jquery
    $(function() { // usually you wrap jQuery in this sort of thing
        var $container = $("#container") // grab container using jQuery
        var $img = $("<img>", {src: src}); // create an image tag with src set
        $container.append($img); // add the image you create, could just add text
    })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some javascript that looks like this: var sel = '<option value={value} {selected}>{name}</option>';
I am new to javascript. I have a function I modifed that when a
I'm trying to integrate Facebook into a site I'm developing, I have created a
I have several Facebook like buttons on myself that are being rendered via XFBML.
I have created an iframe code that I want people to use as a
I have an express app that has a bunch of static javascript files that
I have div containing a list of flash objects. The list is long so
I have a div and an iframe on the page the div has z-index:
I have a div in which a page is loaded with the DojoX Layout
I have a div with overflow:hidden , inside which I show a phone number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.