views:

92

answers:

1

I want to display about 6 items in a jcarousel, the problem is that whenever there are less than 6 items available to the jcarousel, it simply overlaps the items. Like, if I have 3 items, they get overlapped on each other or separates them far apart.

What I am doing wrong ? I have set the item count, visible properties to either max of 6 if we have more than 6 frames, or less than six for lesser frame count.

+2  A: 

Don't use visible, it's mostly useless. Just set the width of the carousel to show as many items as required. Since the carousel does not exist until jCarousel is initialized, and it must have the right width upon initialization, you need to do this from CSS - if you want a non-constant number of elements, you need to create your CSS dynamically either from PHP or from Javascript. Here is a fiddle that does the latter: http://jsfiddle.net/qth8n/

Tgr