CMS Slider with drawings with different ratios

Hi all,

I’m implementing a new CMS slider into a project for a client. Sometimes, depending on the collection, I may have projects with different aspect ratios. I’ve got a small bit of code that depending on the width and height of the image applies ratio classes 3-2 or 2-3. Once those images are put into the slider, the landscape ones go to the top part of the slider whilst the portrait ones fill it out. Is there a way to control that? Ideally, I would like the landscape ones to be centered.

Thanks a lot,
Adam

hey @tinwid! Can you please share a read-only link? I’ll take a look!

Hi Luis! Thanks a lot - please see the read-only link:

You’ll be able to see bits of the code I mentioned in the before tag but I removed the classes from the corresponding images at the moment, apart from ‘photo_internal’. I hope you manage to find a solution, thanks a lot in advance.

Hey @tinwid!

Could you please add the classes to the images so I can see the wrong functionality? Also, on which instance is this happening on?

I see there are around 13 fs-list-instance instances on the page :thinking:

Hi Luis,

Apologies for a delayed reply!

The instance in question in the link is called ‘internal’. The image class in that instance is called ‘photo_internal’. As you can see in that CMS slider, the portrait photo is displayed great, whereas the landscape ones are put towards the top of the slider. Let me know if there’s a way to control the position of the slides.

I’ve got a number of instances as the projects will be organised through a number of CMS sliders, showing existing photos, drawings, sketches and finished photography. I hope that makes sense!

Let me know if you need anything else to investigate.

A

Hello @tinwid! Apologies for the delay on my end!

Could you please try adding the align-content: center property to the slide?

Works wonders! Thanks a lot for looking into this, Luis

1 Like