responsive card depend on number of card

How i make this dynamicly in same component
9 Replies
M@HeR
M@HeR3y ago
Who have idea I want to make it only css Dynamically
vince
vince3y ago
Change flex-basis of the cards based off how many cards are in your flex container through javascript
M@HeR
M@HeR3y ago
i try but not work i use card of mui5
vince
vince3y ago
1. Get the amount of children the parent element has in Javascript 2. Set a class on the cards based on the amount of children are in the container Should be pretty simple to google
M@HeR
M@HeR3y ago
i dont want to use it directly dynamycly i want css do it i found solution with calculate element and work but i need others css directly
vince
vince3y ago
I recommend you look at the "how to ask good questions" post and edit your post detailing what exactly you want and what you tried
M@HeR
M@HeR3y ago
https://discordapp.com/channels/436251713830125568/1035655693845418024 i have solution from Mr @Kevin and i found it good just i will add some condition when i have 1 or 2 card
vince
vince3y ago
Awesome
M@HeR
M@HeR3y ago
thanks for your response brother
Want results from more Discord servers?
Add your server