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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:21:41+00:00 2026-05-26T17:21:41+00:00

I am creating an image slider and only 2 images are displaying at a

  • 0

I am creating an image slider and only 2 images are displaying at a time, there are two arrows on left and right to move the images, I have to place the image horizontally, but only two images are coming inline and other images are going down, I set overflow hidden to the image container, I can’t set the width of the container as the number of image may very dynamically

so how can I set all the images horizontally (2 images on screen, others are hidden as the container property overflow:hidden)

the blue is the container and green boxes are the images.

enter image description here

code

        <div id="slidearea">
<div id="slider">

        <img alt="image" id="0" src="images/thum-1.jpg" style="margin-right: 5px; opacity: 0.5; border-color: rgb(255, 255, 255);">

        <img alt="image" id="1" src="images/thum-2.jpg" style="margin-right: 5px; opacity: 0.5;">

        <img alt="image" id="2" src="images/thum-3.jpg" style="margin-right: 5px; opacity: 0.5;">

        <img alt="image" id="3" src="images/thum-1.jpg" style="margin-right: 5px; opacity: 0.5;">

        <img alt="image" id="4" src="images/thum-2.jpg" style="margin-right: 5px; opacity: 0.5;">

        <img alt="image" id="5" src="images/thum-3.jpg" style="opacity: 0.5;">
        </div>
        </div>
  • 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-26T17:21:41+00:00Added an answer on May 26, 2026 at 5:21 pm

    You do this by using white-space & inline-block properties.

    For example like this:

    #container{
        overflow:hidden;
        width:300px;
        margin:30px auto;
        background:yellow;
    }
    #container #slider{
        white-space:nowrap;
    }
    img{
        opacity:0.5;
        display:inline-block;
        *display:inline;/*IE*/
        *zoom:1;/*IE*/
        background:red;
    }
    

    Check the fiddle http://jsfiddle.net/SNeVH/1/

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

Sidebar

Related Questions

I have been creating an image gallery with jQuery, all is done. The images
I'm creating what should be a simple image slider/flipper. I have a set of
I have 8 images on my View. 4 on left n 4 on right
the tutorial here http://www.edumobile.org/android/android-beginner-tutorials/creating-image-gallery/ teaches how to put images from resources in gallery here's
I am creating an Image Processing app that does two image analysis functions. One
I am creating an application of light in which i am displaying image of
I am creating an image gallery where there are 9 list items per slide
This will be my first time creating one of those slider things. I've seen
Recently, I have been trying to accomplish creating a full-width jQuery slider that would
I'm creating image slider, it's contains in big, 100% x 100%, absolute positioning popup

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.