Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript anythingslider adding space between images

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33650

    Hi all,
    I’m implementing the anything slider on a site and have had the good fortune to be given a hand by mottie on using multiple images. I can’t, however, find out how to add a margin between the images so that they are not shoulder to shoulder. The images are being pulled in dynamically and are being reused on the site so adding the space to the .jpg isn’t an option. Any help would be terrific.

    P

    #84058
    Mottie
    Member

    Hi Patrick!

    Hmm, I swear I answered this question before… ahhh senility!

    Anyway, try setting the “resizeContents” option to “false” then adding a padding around the image. Sort of like I did in this demo.

    CSS

    #slider, #slider li {
    width: 320px;
    height: 220px;
    list-style: none;
    }
    #slider li img {
    padding: 10px;
    }

    Script

    $('#slider').anythingSlider({
    resizeContents: false
    });
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.