Design comparison
SolutionDesign
Solution retrospective
Feedbacks are wellcomes
Community feedback
- @MelvinAguilarPosted over 1 year ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
CSS π¨:
- To prevent your component from becoming too wide on larger screens, consider adding
max-width: 320px
(or20rem
) to your CSS. This ensures your component will not exceed a certain width
- Great start with the CSS! To center the content properly and make your layout more flexible, consider using
min-height: 100vh
instead ofheight: 600px
. This way, your content will adjust to fit the screen height regardless of the device.
- Additionally, add
align-items: center;
to your body styles. This will vertically center the content within the flex container.
Code:
body { . . . β display: flex; β justify-content: center; β /* height: 600px; */ β align-items: center; β min-height: 100vh; } article { β ... β /*margin-top: 40px; */ β /*margin-right: 40%; */ β /*margin-left: 40%; */ β /* width: auto; */ β height: 500px; β max-width: 20rem; }
CSS Reset π:
-
You should 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:
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1 - To prevent your component from becoming too wide on larger screens, consider adding
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