Reputation: 259
I made the following content sliding section: http://jsfiddle.net/JaMYJ/
As you can see, the height of the content on the right loads fine. However, if you click the arrow to move to section two, the content on the right gets cut off.
I know that I can fix this by increasing the height here: .contentslider .slider ul li {width: 490px; height: 310px;}
However, I don't want to define the height. I want the height to set itself automatically to fit all the content on the right sidebar. I am not sure how to get this right via the css or javascript. Any thoughts??
Thanks so much!!
Upvotes: 0
Views: 957
Reputation: 5246
Set the height to auto
instead of 310px
for .contentslider .slider ul li
.contentslider .slider ul li {width: 490px; height: auto;}
And comment out or remove the line li.css({width: li.width(), height: li.height()});
from your jQuery. This line is setting the height for your li which is over-writing the CSS li height.
See http://jsfiddle.net/neo108/EyeBb/5/
Upvotes: 1