Forums

WP Carousel
[resolved] Extra few pixels on left of image (5 posts)

  1. nathobson
    Member
    Posted 7 months ago #

    I have a problem whereby around 5 pixels of the previous image is displayed attached to the current center image. I've played with all the CSS styling attached to the carousel but nothing seems to remedy it.

    I'm afraid I do not have a link at the moment as the site is being developed locally. However, I also see a similar issue on the demo page: http://sumolari.com/demos/wp-carousel.

    Image to show the issue here: http://img825.imageshack.us/img825/5958/wpcarousel.png

    Any ideas what I should tweak?

    http://wordpress.org/extend/plugins/wp-carousel/

  2. alchymyth
    The Sweeper
    Posted 7 months ago #

    if the demo page is already broken, best approach would be to contact the plugin developer directly.

    imho, the shift seems to be caused by the 5px background position in this code from the html of your demo link in the browser:

    <div class="panel_image" style="background: url(&quot;http://sumolari.com/wp-content/demos/jquery-carousel/img4.png&quot;) repeat scroll 5px 0px transparent;">

    hope this helps you to locate the section in the plugin files.

  3. nathobson
    Member
    Posted 7 months ago #

    You know what's really weird... I tried that earlier and it didn't work, tried it again just now and bam, all fixed. Thanks for having a look and helping out, I'll contact the dev when I've got a min, not really sure about the logic behind it.

  4. sumolari
    Member
    Posted 7 months ago #

    Thanks for reporting and for fixing this issue.

    I don't know why I left that 5px there, probably I forget removing it when I release that theme and then it has remained broken since today.

    This problem will be fixed in the next release of WP Carousel.

    Meanwhile you should apply the changes manually, just open wp-carousel/themes/premium-slider/theme.php and look for:

    <div class="panel_image" style="background:url(<?php echo $item['IMAGE_URL']; ?>) 5px 0px; width:<?php echo $temp_panel_width; ?>; height:<?php echo $temp_panel_height; ?>;">

    Replace it with:

    <div class="panel_image" style="background:url(<?php echo $item['IMAGE_URL']; ?>) 0px 0px; width:<?php echo $temp_panel_width; ?>; height:<?php echo $temp_panel_height; ?>;">

    You'll find that line two times in that file.

    Then open wp-carousel/themes/premium-slider/theme-jcarousel.php and do the same modifications.

    These modifications should be done in night-owl and clear-slider theme as well.

    I think that I make a mistake and as I use one of the "broken" themes to make other themes, this error was "copied" to the other ones.

    Why are images used as background in some themes? Well, I needed it for the theme night-owl (I think it was the theme for which I started using this method). I needed to add an inset shadow to the images and as I couldn't add it to a img element, I decided to use the image as background for a div with an inset shadow.

    Probably I made the other themes using night-owl as template, I don't remember it right now.

    But in any case, I think it is not important. The really important thing is that the problem has been reported and fixed (thank you very much, again) and that the next release of WP Carousel will include this fix.

  5. nathobson
    Member
    Posted 7 months ago #

    Many thanks for the speedy reply. I have already fixed it myself and with the prompt from alchymyth (I think when I tried that fix myself I only changed once instance of it).

    Well done on providing such good support for a free plugin :) Overall it's been a pleasure to use and is perfect for the project I'm currently working on.

Reply

You must log in to post.

About this Plugin

About this Topic