Grow your CSS skills. Land your dream job.

AnythingSlider trouble!

  • # October 20, 2012 at 5:59 pm

    Hi. I’m working with the jQuery plugin “AnythingSlider” right now, and it’s giving me some issues. The whole slideshow is off to the right of the page and for some reason, the images in the slideshow are being stretched to fill the entire box.

    I need the images to maintain their normal size and the slideshow to be centered on the page underneath the rest of the content.

    Some info that might help:

    – The whole slideshow is contained in a div with the id of “slider”

    – Each image in the slideshow is contained in its own div

    – There are two javascript sources commented out of the HTML because I’m thinking they’re unnecessary

    Can someone please help?

    Here’s a demo site: http://whitelandsurvey.com/beta/index.html

    # October 21, 2012 at 1:34 am

    Hi NoizyCr1cket!

    Inside of your anythingslider.css file, there are extra margins that shouldn’t be there. These margins should be set to zero.

    #slider {
    width:800px;
    height:362px;
    float:left;
    clear:both;
    margin-left:112px; /* remove this */
    margin-top:66px; /* remove this */
    }

    To prevent the resizing of images, set the “resizeContents” option to false, or you can add an additional wrapper around the images.

    And yes, unless you plan to use the fx or include videos inside of the slider, the two files that are commented out are unneccessary.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".