Design comparison
Solution retrospective
It's my first time coding anything, is there any suggestions you might have for me? Please be critical so I can improve my coding.
Community feedback
- @birkaanyPosted about 2 years ago
Hello Mark,
Things that you can improve in your code;
-Instead of trying to center your container by using margin, you can set your body's display property as flex, justify-content: center, align-items: center. Meanwhile, you should delete margin properties from your float-container.
-Instead of defining float-child1 and float-child2, you can select both divs with ".float-container div". For this selection, define flex:1 to get equal width divs.
As a general mistake, I see that you're using margins to place things. To be more precise and better responsive results, I suggest using flex properties like justify-content, align-items etc. You may want to research flex properties to understand each of them. I believe It'll improve your code in the future, too.
Hope I could help. Happy coding!
Marked as helpful0@KarmicJustisPosted about 2 years ago@birkaany Thank you for that, I was getting frustrated that's why I used the next easier thing I know of.
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