WordPress.org

Support

Support » Plugins and Hacks » Meta Slider » [Resolved] Carousel slider problem

[Resolved] Carousel slider problem

  • First of all thanks for the plugin! I really like it!
    I have just one problem with this (probably caused by me during the slider customization): I’m using a carousel slider to show some images, with 4 picture for screen, but when i scroll the slider to see the next images series, the first and the last images go middle out from the slider and these seems like cutted.

    I tryed to see with firebug and seem that the problem is in the margin-left of the ul (that allows the scroll of the carousel) that changes just of 610px instead of 960px (that’s the width of my gallery).

    So, there is a way to customize this value?

    Thank’s in advance for your help! 🙂

    P.S. Now I’m working on XAMPP so i can’t link the site, but i post some screenshot to be more comprensible! Screen1 Screen2

    http://wordpress.org/extend/plugins/ml-slider/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Matcha Labs

    @matchalabs

    Hi AndCas,

    I think its because you’ve added borders to the images. FlexSlider will calculate how many pixels to shift the carousel across based on each images width, plus a 5px margin between each image (hard coded at the moment). If you add borders or force the margin to be something other than 5px, then the calculation will be incorrect as the extra borders and margin would not be accounted for.

    Regards,
    Tom.

    Thank’s very much for your reply! Now i fixed the problem! 🙂

    Plugin Author Matcha Labs

    @matchalabs

    You’re welcome!

    I’ve just added a hook into 2.1.6 to adjust the margin between slides (but it won’t handle borders still). Add this to your functions.php file if you need to adjust the margin:

    function metaslider_carousel_margin($margin, $slider_id) {
        return 50; // value in pixels
    }
    add_filter('metaslider_carousel_margin', 'metaslider_carousel_margin', 10, 2);

    Regards
    Tom

    darrin365

    @darrin365

    This is very helpful, but is it possible to use this to define different margins between different sliders. For instance, 70px between images in slider ID 26, but 5px between images in slider 126?

    Plugin Author Matcha Labs

    @matchalabs

    Yep:

    function metaslider_carousel_margin($margin, $slider_id) {
        if ($slider_id == 26) {
            return 70;
        }
    
        if ($slider_id == 126) {
            return 5;
        }
    
         return 20; // all other sliders
    }
    add_filter('metaslider_carousel_margin', 'metaslider_carousel_margin', 10, 2);
    darrin365

    @darrin365

    Matcha Labs,

    You are my hero. Thanks!

    Is it possible for the carousel to scroll only 2 images at a time?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] Carousel slider problem’ is closed to new replies.
Skip to toolbar