Results 1 to 7 of 7

Thread: Step Carousel center panel problem

  1. #1
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Step Carousel center panel problem

    1) Script Title: Step Carousel Viewer v1.9

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...epcarousel.htm

    3) Describe problem: My example page: http://www.lastyling.co.uk/test/gallery.html I've set up the carousel and it works great however I'd like to center the active panel instead of it going to the left of the belt.

    I've found this bit of the code in the JS file:

    $currentpanel.css({float: 'none', position: 'absolute', left: paneloffset+'px'}) //position panel

    which if I change paneloffset to 150px for example I can influence the panel to be centered. The problem is however that the panels I'm using are all different widths so not all the panels are being centered with a fixed measurement. The carousel width is 1010px so I think I need the code to take width of the 'active' panel and subtract that from 1010px and then divide that by 2 in order to center the content however I'm a bit of an amateur with the javascript/jquery side of things so I'm having no luck whatsoever!

    Is there a way to something similar to this or will be forced to use the semi-solution I've got and use images with the same widths?

    Any help you can give will be hugely appreciated!

    Josh

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,009
    Thanks
    16
    Thanked 315 Times in 313 Posts
    Blog Entries
    13

    Default

    Can you not do that on each panel individually where differing widths are defined? See method 2: http://www.dynamicdrive.com/dynamici...suppliment.htm

    I imaging that "left:?px" or "margin-left:?px" would do it but I havent test as I'm on iPhone.
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,810
    Thanks
    2
    Thanked 423 Times in 417 Posts

    Default

    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  4. The Following User Says Thank You to vwphillips For This Useful Post:

    snaveage (12-16-2012)

  5. #4
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Beverleyh - Thanks for the reply but because it was being reset each time by the javascript it wasn't working quite as I wanted.

    vwphillips - HUGE thanks! That is exactly what I wanted! Just had a couple of questions:

    1) Is it possible to have the first and last panels not centered but instead left aligned for the start and right aligned for the end? Not a big problem if this can't be done as instead I will make those panels the full width off the carousel.

    2) Is there a way to target the active, previous and next slides? I'd look to darken the panels on either side if possible to draw focus to the active slide.

    Again massive thanks for taking the time out to help!

    Josh

  6. #5
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,810
    Thanks
    2
    Thanked 423 Times in 417 Posts

    Default

    http://www.vicsjavascripts.org.uk/AA...II/121212B.htm

    I will look at the darken slide later
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  7. The Following User Says Thank You to vwphillips For This Useful Post:

    snaveage (12-16-2012)

  8. #6
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,810
    Thanks
    2
    Thanked 423 Times in 417 Posts

    Default

    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  9. The Following User Says Thank You to vwphillips For This Useful Post:

    snaveage (12-16-2012)

  10. #7
    Join Date
    Dec 2012
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I really can't thank you enough for your help, that is absolutely perfect!

Similar Threads

  1. Step Carousel - Starting the carousel with a Panel id
    By kylu in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 04-18-2012, 11:09 PM
  2. Step Carousel - unwanted blank panel
    By mattmac in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 03-04-2011, 09:02 AM
  3. Step Carousel print panel img src?
    By Lol999 in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-16-2011, 04:59 PM
  4. Step Carousel embedded in spry panel
    By friendlyarctic in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 11-18-2008, 04:14 PM

Bookmarks

Posting Permissions

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