Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Finished QR code component

Randomgituser69• 220

@Randomgituser69

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

Proud of making it similar to what it looks in the picture of the design. Though I'd apologize for the photo not loading for some reason. Idk why it didn't it load. Btw not sure what would i do differently next time

What challenges did you encounter, and how did you overcome them?

I was struggling with putting the card to the center but when i set the display to grid,place content, place items to center then it's fixed

What specific areas of your project would you like help with?

Guys how can i fix html img not showing on GitHub repository? Adding ./images/ to the href didn't even work. How do i fix it please please? I've never been so angry over this

Community feedback

T
Grace• 28,810

@grace-snow

Posted

Here is some foundational feedback to help you. Note you will need to refactor all projects with some of these things.

  1. All content should be contained within landmarks. This needs a main wrapping the component, and a footer for the attribution.
  2. You don't need to use the picture element in this. The picture element is used when you want to serve different images at different screen sizes. This only has one image. When you do need to use the picture element in future, you would make the mobile image the default inside the img element and you would use a min-width media query in the source tag (media query defined in rem or em not px) to serve the larger screen image.
  3. The Imogen this is extremely important content. That means it needs a proper description. In this case the alt should say what the image is (QR code) and where it goes to (two frontendMentor.io).
  4. There should be no hgroup in this.
  5. You don't actually need an extra div to wrap the image or the text. It's no problem having it in there but as a general rule keep the HTML as simple as possible.
  6. Remove the br from the heading. That is not how you create line brakes. Some screen readers will announce this as "break" in the middle of the heading, which is not what you want. Instead let the lines break naturally. In some cases in certain challenges if you need lines to break earlier you would give the element a max width rem or ch units, and margin-inline auto if that limited width element also needs horizontal centering.
  7. Never set font-size in px. Use rem.
  8. Get into the habit of always including a full modern CSS reset at the start of your styles. Andy Bell or Josh Comeau both have good ones you can look up and use.
  9. It's better for performance to link fonts in the HTML head instead of CSS imports.
  10. Recommend use the flex column method to centre components like this in the viewport and not the grid place-content center method. This will prevent overflow people viewing a site on smaller screens who have a larger size. It's a more robust method.
  11. There should be no widths or heights in this challenge. All the card needs is a single max width in rem.
  12. The image must not have a width pixels. All it needs is what is included in a CSS reset anyway (Display block and Max width 100%).
  13. There is no benefit to using grid on this card. All it needs is a text align center. The only benefit using grid or flex on this card would be if you wanted to use the gap property instead of margin to create vertical spaces. But really that's unnecessary.
  14. The image doesn't need small padding and margins. Let the image be Full size. Can optionally have a margin bottom. But as you've already given margin top to the H2 even that is unnecessary.
  15. Your card is actually off centre at the moment. This is because the footer (attribution) is wider than the card and the card sits to the left inside it's grid area. If you use the flex column approach to center your component as I suggest above this would be solved.
0
Natércio• 30

@Natercio8

Posted

Does the layout look good on a range of screen sizes?

0

Randomgituser69• 220

@Randomgituser69

Posted

@Natercio8 yes

0
P
gonzzdev• 70

@gonzzdev

Posted

Hey there!

Here are some steps on how to import your image.

  • Go to your GitHub repo (https://github.com/Randomgituser69/Qr-code-component-)
  • Click on add file and drag the file to your repository.
  • Edit your index.html file to add image using:
<img src="image-name.png" />
0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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