Design comparison
Solution retrospective
what do you guys think does it need any other adjustments
Community feedback
- @Kamlesh0007Posted over 1 year ago
Hello there 👋. Good job on completing the challenge !
In general, the solution is excellent. I have 2 small suggestions:
CSS 🎨:
Yes, there are other ways to center the card without using flex. One way is to use the grid layout: .container { display: grid; place-content: center; min-height: 100vh; } You can read more about centering in CSS here 📘. Note⚠️: Use min-height: 100vh instead of height. Setting the height to 100vh may result in the component being cut off on smaller screens, such as a mobile phone in landscape orientation. Note⚠️: You can also use position: relative, but using it in this type of component is a bad idea because it will clip it on mobile devices. CSS Reset 🔄:
Currently, you have a vertical scrollbar, which is due to the default margin that some browsers apply to the body element. To remove it and avoid problems in future challenges, I recommend starting to use a CSS reset. A CSS reset is a set of CSS rules that are applied to a webpage in order to remove the default styling of different browsers. CSS resets that are widely used: "My Custom CSS Reset" by JoshWComeau Reset CSS I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0 - @BankoleCalebPosted over 1 year ago
Of course, it needs adjustment. Especially the centering.
Since you have decided to use flexbox on the body like that, you can also change the flex direction so that the two block would stack on top of each other, rather than side by side as it is now.
Also, you did not seem to use the right colors. The text is not readable.
You have done a very good job, kudos. Just a little more touch.
Marked as helpful0@Ayotommy012Posted over 1 year ago@BankoleCaleb i have tried to but its not responding do you know an effective way to make them stack ontop of each other
0@BankoleCalebPosted over 1 year ago@Ayotommy012 add this to the body: flex-direction: column;
add this to the .card : width: fit-content; margin: 0 auto;
it should fix it. Please let me get feedback.
Marked as helpful0 - @Kira-SannPosted over 1 year ago
no geral esta muito bom mas poderia melhorar alguns aspectos como o cor do card que esta diferente de projeto
deixe o card centralizado ao centro com as informações de que fez o código a baixo
a maneira que você fez o css não esta errada mas e recomendada fazer em um arquivo separado. basta usar a tag
<link rel ="stylesheet" href ="(nome do arquivo aqui).css">
dentro da tag<header>
Marked as helpful0
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