Javascript Image Slider / Posts /

Cropping an overflowing image in the image slider


Hello, your slider have been used in many of my websides. But now I reached a point where I have an issue that is insurmountable for me. I have realised that the images which I use are cropped in your slider from the ride side and a bottom side in case of their overflowing. Is there any possibility how to modify the code that in case that the image is for examle too wide, to cut him from the left side? I tried to modify it by myself and I was partly succesfoul. I managed to place the images to the right corner but unfortunately I totally broke the function that controll the effects so the images are just skipping without them. I woud be gratefoul for any of your help. Thank you so much for your time. Best Regards, Jakub

Jakub  7 years ago   viewed: 3040    

1 Answer


If your images are not in the same size, I recommend you use the Ninja Slider that is responsive to your screen or your specified slider frame size, and you can specify how to deal with different aspect ratios of the images by the style { background-size:contain;} or { background-size:cover;}. If you are good at CSS, you can also consider using background-position and background-size together. For details please read the tooltip popup from the aspectRatio link on the page Ninja Slider.

Milo   7 years ago


Your name*
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: