Help in CSS

Dear Community,

I need a help in CSS. If it’s possible to change aspect ratio of image in in card/grid collection with CSS, please help me with it.

I have a classic app with numerous flashcards with 3:4 aspect ratio. While migrating the images to new app, the images don’t fit in collection. As of now I have been using image component and showing one image at a time, but with collection, I can horizontal and vertical scroll just like class apps.

If it’s possible with CSS, I’ll switch from Legacy plan to maker plan and add CSS to change the aspect ratio.

Regards,
Chirag

I think it’s definitely doable. What type of collection will you be using?

1 Like

Most probably grid.

Can you share some sample image URLs that you are using?

Here are some samples:





.card-collection .aspect-four-by-three {
padding-top: 125%;
}

I name my collection’s CSS class “card-collection”. Setup with size L, original aspect ratio 4:3.

1 Like

Thanks a lot brother for your help :slightly_smiling_face: :clap:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.