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 6172177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:20:51+00:00 2026-05-23T23:20:51+00:00

I need to create a slideshow of images that will be displayed when i

  • 0

I need to create a slideshow of images that will be displayed when i click on their specific number from 1-5. But the problem that i am facing is that the images are being displayed one after the other. so if i hide image 1 and then display image 2, the image 2 is not getting displayed in the place of image 1, but is displayed below the image 1.

what is it that I am doing wrong?

  • 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-23T23:20:52+00:00Added an answer on May 23, 2026 at 11:20 pm

    You say: “the images are being displayed one after the other“.

    I assume they are in some container – a <div> maybe. Set the CSS property position: relative for this container, and set position: absolute; top: 0; left: 0 for the images. This will help you with the images being placed one after another – they will be stacked all in the same place.

    In this state, they probably will look ugly (unless they all have the same size), so you should hide all but the one you want to show. Just define display: none as the default property of these images in the CSS sheet, and set the individual property of the displayed one to display: block (by JavaScript – it’s very simple, you do not need jQuery, as pointed by Frog).

    This is the basic way.

    Now, if you want to do the task right, you should take care about the users who have JavaScript disabled (at least I would appreciate this 😉

    Define the default layout of the page so, that users without JavaScript would see all the images, one near another. You already have this.

    Now, when your page is rendered in a browser where JavaScript works, let your script set a class on the container (I usually use the class “live”), and define another set of CSS rules to display the images in one place (that position: absolute and display: none), and check the first image as visible (for example give it a class “visible”).

    Now, when the user clicks on some kind of ‘Next’ button, your JavaScript needs only remove the class “visible” from the ‘old’ image, and set it in a ‘new’ image.

    An example of HTML:

    <div id="slideshow"><img ../><img ../></div>
    

    and basic properties in CSS:

    #slideshow { ... } /* noscript */
    #slideshow.live {  /* script */
      position: relative;
      height: ..;
      width: ..;
    }
    #slideshow img { ... } /* noscript */
    #slideshow.live img { /* script */
      display: none;
      position: absolute;
      top: 0;
      left: 0;
    }
    #slideshow.live img.visible { /* script + choosen one */
      display: block;
    }
    

    I believe you will know how to write the JavaScript part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a slide show of some images that can go full
I want to create a program that produces an executable slideshow. So I need
I need to create a server-side application that takes an array of images and
I need to create slideshow for gallery. And one thing that I don't know
I'm trying to create a dependent caption display from within the Cycle call: $('#slideshow-images').cycle({
I need create clone repository. but I do not know where can I get
Need to create a custom DNS name server using C which will check against
I need to create a historical timeline starting from 1600's to the present day.
I'm using Visual Studio 2008 and I need create a DataTable from a Excel
I need create a css like this: .word-remain+textarea{clear: before} but I cannot write this

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.