Quantcast
Viewing all articles
Browse latest Browse all 1307

Achieving consistent card placement in responsive layout with flexbox [closed]

I am currently working on a React project that involves displaying a set of cards inside a container. Each card has a fixed size of 231x237px. I have used flexbox for the layout of the cards. I want the number of columns to be even when moving a card to a new line. For example 2,4. Or 1 (on the smallest devices)

1 row: Card  - Card - Card - Card

or

1 row: Card - Card2 row: Card - Card

Image may be NSFW.
Clik here to view.
wrong displaying

Image may be NSFW.
Clik here to view.
correct


Viewing all articles
Browse latest Browse all 1307

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>