Design comparison
Solution retrospective
I am unsure if the card has the correct width and height as well as the fonts have proper sizes.
Community feedback
- @MelvinAguilarPosted 12 months ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML π·οΈ:
- Use semantic elements such as
<main>
and<footer>
to improve accessibility and organization of your page.
- Always avoid skipping heading levels; Starting with <h1> and working your way down the heading levels (<h2>, <h3>, etc.) helps ensure that your document has a clear and consistent hierarchy. Source π
CSS π¨:
- You should use the
box-sizing: border-box
property to make thewidth
andheight
properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here π.
- Setting the width of the component with a percentage or a viewport unit will behave strangely on mobile devices or large screens. You should use a max-width of
320px
or20rem
to make sure that the component will have a maximum width of320px
on any device, also remove thewidth
property with a percentage value.
-
Consider centering your element using either a grid or flexbox layout for more precise and responsive centering.
For Flexbox:
body { min-height: 100vh; display: flex; justify-content: center; align-items: center; /* Additional styles if needed */ }
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
1@knastPosted 12 months ago@MelvinAguilar Thank you for really detailed response and tips! I will surely implement them when I find time. I wish you happy coding too!
0 - Use semantic elements such as
- @adrnmatosPosted 12 months ago
Hi. Try putting some right and left padding to the blue container. It should grow to fit both padding and image sizes.
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