Design comparison
Solution retrospective
how to put children inside flexbox in equally size ? rate this design please
Community feedback
- @GerbenDolPosted over 4 years ago
Hi there! Be sure to check out the resources page! There's some great tools for learning more about flexbox.
I really liked the "game" ones, for example I worked on this one yesterday.
Keep up the nice work!
0 - @carlosdlrocaPosted over 4 years ago
Hey EsraaGamal-22, So far so good. The best way I have been able to set the width of a flexbox item is to set the flexbox child's flex-basis value to something.
For example, you can set each flexbox child to be 30% of the width of its parent, so you set
flex-basis: 30%
I hope this helps. Feel free to reach out if you have anymore questions.
0@EsraaGamal-22Posted over 4 years ago@carlosdlroca the precentage should be equally for all childern ? child 1: 30% child 2: 30% child 3: 30%
0@carlosdlrocaPosted over 4 years ago@EsraaGamal-22 Yes, exactly. Although, one thing to note: I tried adding the flex-basis to your .sub-1 - .sub-4 elements but it didnt really work. You need to add/remove some other styling from the parent and children elements. Good Luck!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord