Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    2
    Thanked 0 Times in 0 Posts

    JQuery... Can't centre the slideshow in my site!

    Hi there!

    How can I centre my jQuery simple slideshow in my website? Is there any code to add?

  • #2
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    yeah, use css

  • #3
    New Coder
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    2
    Thanked 0 Times in 0 Posts
    This is the css i'm using.... what should I add to center the slide show?

    #slideshow {
    position:relative;
    height:350px;
    }

    #slideshow a{
    position:absolute;
    top:0;
    left:0;
    z-index:8;
    }

    #slideshow a img{
    border:none;
    }

    #slideshow a.active {
    z-index:10;
    }

    #slideshow a.last-active {
    z-index:9;
    }

  • #4
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    #slideshow {
    position:relative;
    height:350px;
    margin:0px auto;
    }


    you need a width though. if that dont work without a width try

    #slideshow {
    position:relative;
    height:350px;
    text-align:center;
    }

  • #5
    New Coder
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I don't know what's wrong. but it's not working . I have tried them both.

    check here how it is showing http://www.pimpthatfood.com/

  • #6
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    since its set to relative add a left:60px; or whatever number makes it right

  • Users who have thanked seco for this post:

    pimpthatfood (09-25-2009)

  • #7
    New Coder
    Join Date
    Sep 2009
    Posts
    30
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks very much it worked perfectly.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •