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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:18:26+00:00 2026-06-17T23:18:26+00:00

I would like to make a Jquery slider, with the previous and next button

  • 0

I would like to make a Jquery slider, with the previous and next button in the image. I currently have the following code, which shows the previous and next button below the image. The slider is working now as it’s supposed to, but the buttons are below the image instead of in the image. How could I change this to have the previous and next button in the image?

HTML code:

<div id="slider">
       <ul>
         <li id="slide1"></li>
         <li id="slide2"></li>
         <li id="slide3"></li>
       </ul>
       <a href="#" id="slider_prev"></a>
       <a href="#" id="slider_next"></a>
</div>

CSS code:

#slider {
width:1148px;
    overflow: hidden;
}
#slider ul {
 margin: 0;
 padding: 0;
 list-style-type: none;
 position: relative;
 z-index: 1;
}
#slider ul li {
 float: left;
 width: 1148px;
 height: 195px;
}
#slider_prev, #slider_next {
width:53px;
height:52px;
display:block;
margin-top:69px;
}
#slider_prev {
float:left;
margin-left:42px;
margin-right:92px;
background: url("../images/prev.png") no-repeat 0 0 transparent;
}
#slider_next {
float:right;
margin-right:42px;
margin-left:92px;
background: url("../images/next.png") no-repeat 0 0 transparent;
}
#slide1 {
 background-image: url("../images/slider_1.png");
}
#slide2 {
 background-image: url("../images/slider_2.png");
}
#slide3 {
 background-image: url("../images/slider_3.png");
}
  • 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-06-17T23:18:27+00:00Added an answer on June 17, 2026 at 11:18 pm

    What you are wanting to do is place one element over the other. You need to set position to absolute for the 2 anchor tags. And then set the z-index for those elements. z-index determines which element is above other. A relatively lower z-index will move element beneath the others and vice-versa. But the absolute position needs to be relative to some parent element. As you are positioning element relative to slider then the element with id= slider should be set to relative. And lastly set the position for the buttons using the “top” “bottom” “left” “right” variables.

    #slider {
        width:1148px;
        overflow: hidden;
        position: relative; //Set parent element to relative
    }
    #slider_prev, #slider_next {
        width:53px;
        height:52px;
        display:block;
        position: absolute;    // Set the buttons to position absolute
        z-index: 100;  //Set a value for z-index
        top: px;  //Set the amount of pixels from top of "slider" div
    }
    #slider_prev {
        left: px;  //Set the amount of pixels from left of "slider" div
        background: url("../images/prev.png") no-repeat 0 0 transparent;
    }
    #slider_next {
        right: px;  //Set the amount of pixels from right of "slider" div
        background: url("../images/next.png") no-repeat 0 0 transparent;
    }
    

    Hope that helps.

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

Sidebar

Related Questions

Hi I currently have a jquery image slider script that pulls images from a
I would like to do a rounded slider like the image below. Is jQuery
I downloaded http://code.google.com/chrome/extensions/samples.html#ea2894c41cb8e80a4433a3e6c5772dadce9be90d . I would like make it it jQuery, but if i
I would like make an extension method for the generic class A which takes
I would like to make register button, but when people click on it. A
I would like to make abstract class which has several inner classes extend it
Im currently using a plugin called Cycle for jQuery and would like to tweak
I'm trying to make a slider from scratch like the jQuery UI one but
I have added a Jquery slider (called SudoSlider) to my website, with 'previous' and
I'm trying to make my first steps with jquery mobile and I would like

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.