treehouse : what would you like to learn today?
Web Design Web Development iOS Development

AutoWidth of Images not working in AnythingSlider.

  • 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 : http://bit.ly/YALbSC

  • 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?

  • Hi @PakTangent!

    Try removing the width setting in the css: http://new.theparaders.co/modules/lookbook/css/slider.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;
    }
    
  • @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.

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

  • Ahh thanks!

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