Design comparison
Solution retrospective
Proud of my diving in even without enough knowledge and experience, and for trying to make something first even if it wasn't close to the final result.
What challenges did you encounter, and how did you overcome them?I go stuck in the css part very early on, with the divs tags and classes confusing me. I went on youtube and found a tutorial from "Mr.Coder". I watched it once and tried to mimick how he did it, but still had to go back several times to get everything right.
Also the Github repository was confusing, fortunately "codercoder"s video was very clear for the setup, but finding and publishing the live url took me another half hour to figure out.
What specific areas of your project would you like help with?Not much.
Community feedback
- @grace-snowPosted 7 months ago
Hello! Well done at diving into your first challenge. there are some important learnings from this first challenge that will set you up well for future. I hope this feedback is helpful.
- The stylesheet link goes in the head not body.
- Remove the header landmark. This challenge had no header and you must never leave empty landmark elements on the page. These are very important elements for accessibility (assistive tech users use landmarks and headings to understand the contents of a page and navigate within it).
- This is missing a main landmark. Every page must always have a
main
. Change container to be a main not div. (NB: This is a single component challenge so these landmarks are not strictly needed but it's best to get into the habit of adding it straight away so you don't forget later). - The image alt description isn't quite right. Think about the context of how this card component would be used on a real site. It's likely there could be several cards like this on a page so the image alt must give an accurate description of this specivific image. It should say what the image is (QR code) and where it goes (to FrontendMentor.io). There is a read post in the resources channel on discord about how to write good alt text if you want to know more.
- It's really valuable to make sure you Indent your code consistently so it's easier to read and spot bugs. Your code editor can even do this formatting automatically for you with prettier.
- The starter code came with a gitignore file. Do not remove that from your repo! It stops files like DS STORE which should not be there from being tracked by git.
- It is better for performance to link fonts in the html head instead of css imports.
- Get into the habit of including a full modern css reset at the start of the styles in every project. Andy Bell or Josh Comeau both have good ones you can look up and use.
- Justify content center is missing from the body in css.
- The components max width should be in rem not px. This is important because many people change their default text size. If you set a max width in px that is an explicit limit but would look awful and narrow for those users with larger text. If you use rem instead the layout will scale correctly for all users.
- I think you may be a little confused between padding vs margin. I wouldn't expect a heading to have padding as its not a box, it's a text element and has no concept of needing "internal" space.
- ⚠️ Font size must never be in px
- There is no need to use position fixed or absolute on the footer. This is causing a horrible bug where the footer overlaps the card because you're taking the footer out of its normal place in the document.
- I think your heading text size is too large in comparison to the design. Try to adjust that.
Marked as helpful0@tybagluePosted 7 months ago@grace-snow Thanks for the comments, i've tried to change the code according to ur suggestions.
0 - @mkborisPosted 7 months ago
Hi tybaglue great job, here are some suggestions
- All content should be wrapped within landmarks. Wrap a
main
tag around the container. Also, you dont need the emptyheader
. - Your css stylesheet link should be in the
head
not thebody
. - The
body
tag is the container for the content of an HTML document, so yourfooter
should be be in thebody
not outside. - Font-size should be written in rem not px. This article explains it better Why font-size must NEVER be in pixels.
Hope this helps.
Marked as helpful0 - All content should be wrapped within landmarks. Wrap 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