Design comparison
SolutionDesign
Solution retrospective
What can I improve in terms of my code and design? What should I consider?
Community feedback
- @grace-snowPosted 11 months ago
There are some important foundational things to learn in this that you'll need to know for every future challenge.
- All content must be contained within landmarks. Every page should at least have a
main
element, and in this case you should have the attribution in afooter
- the image is extremely important content, the most important on the page in fact. That means it must have a proper alt description saying what it is and where it goes. You cannot treat it as decorative and leave the alt blank.
- the card should have a heading element, it's not two paragraphs
- link font(s) in the html head. This is more performant than css imports
- always use a modern css reset at the start of the styles. Look them up
- you will never want to use width 100vw. That is often wider than the screen because viewport units don't account for things like scrollbars. The body is already full width so you don't need to do anything to it's width
- never limit the height of elements that contain text, including the body. Instead of height 100vh, use min-height so the element can grow taller as needed
- remove width and height from the component. The browser can decide how much height is needed. And instead if giving an explicit width in px, use max-width in rem. This allows the component to shrink narrower if needed, and let's it adapt responsively even if users change their font size
- the component info div isn't actually needed at all, buf if you want to keep it, give it a max width (in rem or ch) and auto margin on the sides.
- the img doesn't need all those styles. Usually a css reset sets images to be display block and max-width 100%. The only other thing this needs is border radius, and optionally width 100%
Marked as helpful1 - All content must be contained within landmarks. Every page should at least have a
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