CSS and jQuery slider height/positioning question
THIS IS THE TEST SITE.
If you look at the example above the slider on the right has 2 images. The first one is smaller than the second. The second is around 500px high. What I'开发者_如何学Pythonm looking to do is expand the slider vertically depending on the height of the images inside.
I believe the js is setting the height of the image when it is called from the server and I can't find a way to override it with the CSS.
Any help would be very appreciated. Thank you!
First of all what crimson_penguin said it's true. You have to define beforehand a containers height and make sure that the images inside don't exceed that heigh.
Look for this lines in the cycle plugin:
if (opts.fit && opts.height && opts.height != 'auto')
$slides.height(opts.height);
These tells the plugin to stretch the image. Below that there are the lines that stretch the container. Fooling around with that will solve your problem.
精彩评论