The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

AutoWidth of Images not working in AnythingSlider.

  • # February 5, 2013 at 2:04 pm

    I am using the AnythingSlider, I want it to work as slider#2 in the demo in which the resizeContent option is set false and the slider resizes according to the images.

    I have applied it as in the example but it does not resize. Can any body tell what i am doing wrong. To have a look at the site :

    # February 5, 2013 at 2:27 pm

    I have worked out a little and sorted that the problem is that the img tags in li get overriden. Is there a way so that they do not get overridden and keep there values of style attribute?

    # February 5, 2013 at 2:56 pm

    Hi @PakTangent!

    Try removing the width setting in the css:

    #slider {
    width: 780px; /* REMOVE THIS LINE */
    list-style: none;
    /* Prevent FOUC (see FAQ page) and keep things readable if javascript is disabled */
    overflow-y: auto;
    overflow-x: hidden;

    # February 5, 2013 at 2:59 pm

    @Mottie :

    I have removed but still the issue persists. I do not how does it calculate the width. I have tried inline width and height, from CSS but it always over rides.

    P.S: Only anythingSlider.css file is being used. I am setting no other styles.

    # February 5, 2013 at 3:16 pm

    Its wierd. but the problem was with slider.min.js works fine with slider.js

    # February 5, 2013 at 5:59 pm

    Ahh thanks!

    That was a bug in the minified version! Somehow I didn’t update the code, but it’s all fixed now. Thanks!

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed