stats-preview-card-component-main
Design comparison
Community feedback
- @its-rkraviPosted over 1 year ago
Congratulations @sumaiya-rahman-chowdhury for completing the challenge.
Welcome to the Frontend Mentor Platform. I want to give you some feedback regarding your code. Inside the style.css file you write a lot of CSS properties which I think not needed. for centering the main container and there are a lot of differences b/w your design and actual design.
you write a lot of CSS properties for centering or adjusting the main div or container.
.main{ width: 70%; margin: auto; margin-top: 100px; height: 450px; display: flex; margin-bottom: 100px; box-shadow: 1px 2px 5px 5px white; }
for centering the main component. It looks complex.
You can do the same thing either using flexbox or grid.
Example(Grid):
.main { display:grid; place-items:center; }
Example(flexbox):
.main { display:flex; justify-content:center; align-items:center; }
Using Flexbox or Grid to center elements can offer several advantages, including better responsiveness, cleaner code, and improved compatibility. Additionally, it promotes the adoption of best practices in web development.
Use more modern and flexible techniques like Flexbox or Grid for layout purposes. These CSS features are designed to make web development easier, more maintainable, and responsive across various devices.
I hope you find this feedback helpful.
Keep up the excellent work, and if you have any further questions or need assistance with anything, feel free to ask.
Mail : [email protected]
Instagram : its_rkravi
Together, we can continue to build a supportive and knowledgeable community.
Best regards, Rahul Kumar Ravi
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