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

  • Home
  • SEARCH
  • 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 6889241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:07:52+00:00 2026-05-27T06:07:52+00:00

What I have Is a centered div in my webpage containing a picture that

  • 0

What I have Is a centered div in my webpage containing a picture that I want to slide from right to left so that user can see another picture..the effect I want to achieve is this

hope you can help me out finding out how to do it

thanks

  • 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-27T06:07:53+00:00Added an answer on May 27, 2026 at 6:07 am

    SLIDER DEMO

    var imgN = $('#slider img').length;
    var galW = $('#gallery').outerWidth(true);
    
    $('#slider, #info').width(galW*imgN);
    
    $('#nav li').click(function(){
      var ind = $(this).index();
      $('#slider').stop(1).animate({left: '-'+galW*ind },1500);
      $('#info').stop(1).delay(250).animate({left: '-'+galW*ind },1800);
      $(this).addClass('active').siblings('li').removeClass('active');
    });
    

    HTML:

      <div id="gallery">
        <div id="slider">
          <img src="http://dummyimage.com/700x350/9ae/fff&text=1">
          <img src="http://dummyimage.com/700x350/e44/fff&text=2">
          <img src="http://dummyimage.com/700x350/878/fff&text=3">
        </div>
    
    
      <div id="nav">
        <ul>
          <li class="active">Go to slide 1</li>
          <li>Go to slide 2</li>
          <li>Go to slide 3</li>
        </ul>
      </div>
    
        <div id="info">
          <div class="info"><h3>Info panel 1</h3></div>
          <div class="info"><h3>Info panel 2</h3></div>
          <div class="info"><h3>Info panel 3</h3></div>
    
        </div>
      </div>
    

    CSS:

      #gallery{
        width:700px;
        height:490px;
        position:relative;
        margin:20px auto;
        background:#eee;
        overflow:hidden;
      }
      #slider{
        position:absolute;
      }
      #slider img{
        position:relative;
        float:left;
      }
      #nav{
        width:700px;
        z-index:2;
        position:absolute;
        top:305px;
        text-align:center;
      }
      #nav li{
        cursor:pointer;
        display:inline;
        background:#ddd;
        padding:10px;
        margin:1px;
        border-bottom:1px solid #999;
        -moz-border-radius-topleft: 6px;
    -moz-border-radius-topright: 6px;
    -moz-border-radius-bottomright: 0px;
    -moz-border-radius-bottomleft: 0px;
    -webkit-border-radius: 6px 6px 0px 0px;
    border-radius: 6px 6px 0px 0px; 
      }
      #nav li.active{
        background:#eee;
        border-bottom:1px solid #eee;
      }
    
      #info{
        position:absolute;
        top:350px;
        height:140px;
        width:700px;
        background:#eee;
        border-top:1px solid #999;
    
      }
      div.info{
        position:relative;
        float:left;
        width:650px;
        padding:10px 25px;
        height:120px;
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webpage containing a centered container with content and I want to
I have a div centered in the site and containing a picture. The div
I have .centered-holder { margin-left: auto; margin-right: auto; clear: left; display: inline-block; } Then
I am designing a webpage with a contact form that you can see here
I have a horizontally centered div #box1 that has margin: 5px auto that has
I have a page that I want centered, with a background and a border
I have an application that shows a list of items. The user can click
I have a centered div layout. The left side of the div in the
I have a div that contains an h3 tag, and i want the h3's
I have a div that sits at the top of a webpage, but the

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.