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

hi this is my soultion for your challange

@mohamed-abd-elkahlk

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@mikej321

Posted

Hello there!

One thing I noticed that could really help your code is to remove the "/" from the start of your image's location. It would read like this <link rel="stylesheet" href="images/image-qr-code.png". I believe that is blocking the image from showing in your final solution. I would also add that you don't necessarily need a div to hold the image, although it doesn't hurt the final product, I believe. Finally, I'd place some descriptive alt text within the image as it helps with screen readers and is really important for accessibility. Great job on your first project though and I hope that it was a fun experience.

Marked as helpful

1

@mohamed-abd-elkahlk

Posted

@mikej321 I appreciate the information and advice you have shared.

0

@MelvinAguilar

Posted

Hi @mohamed-abd-elkahlk👋, good job completing this challenge! 🎉

Here are some suggestions you might consider:

  • Update the path of the image with ./:
<img src="./images/image-qr-code.png" alt="your_at_text">

More information..

  • Use max-width: 300px to .card selector instead of width, this will make the card container a bit responsive on mobile and set the element's maximum width to 300px.
  • Add descriptive text to the alt attribute of the images. The text must clearly describe the image. The alt attribute enables screen readers to read the information about on-page images and will be displayed instead if an image file cannot load.
  • Update the image selector to make responsive images.
.card .image img {
    max-width: 290px;
    width: 100%;
    object-fit: contain;
}

Good job, and happy coding!

Marked as helpful

0

@mohamed-abd-elkahlk

Posted

@MelvinAguilar Thank you for taking the trouble to help me.

0
Lucas 👾 104,560

@correlucas

Posted

👾Hi @mohamed-abd-elkahlk, congratulations on your solution!👋 Welcome to the Frontend Mentor Coding Community!

Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:

  • Use <main> instead of a simple <div> this way you improve the semantics and accessibility showing which is the main block of content on this page. Remember that every page should have a <main> block and that <div> doesn't have any semantic meaning.
  • Replace the <h2> containing the main title with <h1> note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.
  • Add a margin of around margin: 20px to avoid the card touching the screen edges while it scales down.
  • Use relative units as rem or em instead of px to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.

Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR

✌️ I hope this helps you and happy coding!

Marked as helpful

0

@mohamed-abd-elkahlk

Posted

@correlucas Thank you so much for the help. Please let me know if I can return the favor.

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