Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 6 months ago

Semantic HTML5 markup CSS custom properties and Flexbox

pure-css
Eziefule Judith•120
@a2-112
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


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

I learned how to make my code responsive though still learning, also using of margins, widths and paddings got more understanding on them, lastly learnt how to resolve errors when linking a font to a code. I hope to make more responsive pages and learn more problem solving technics.

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

I had issues with the responsiveness, and i resolved it by making lot of media queries for each px that is faulty. Also with the link, i used double quote whereas it was meant to be a quote, and this issues made the font not to display.

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

Responsiveness understanding margin and padding width measurement min/max width

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Kamran Kiani•2,780
    @kaamiik
    Posted 6 months ago

    Some notes:

    • Never limit your width and height in a container or element or tag that contains text inside. When you limit the width and height of elements containing text, you risk the text being cut off, overflowing, or becoming unreadable, especially on smaller screens or when the text dynamically changes. It's generally better to allow the container to adjust its size based on its content or set a flexible size that can adapt to different screen sizes and text lengths. You only need max-width here because it prevents elements from stretching beyond a certain point, keeping them visually appealing across different screen sizes. It ensures your design remains adaptive and doesn't get too wide on larger screens.

    • Your font-size and max-width should be in rem unit not px. You can read this article about it and why you should not use px as a font-size.

    • Try to use a proper CSS reset at the start of your CSS style. Andy Bell and Josh Comeau both have a good one. You can simply search on the internet to find them.

    • Use min-height: 100vh; instead of height:100vh;. height: 100vh strictly limits the height to the viewport size, potentially causing overflow issues if the content is larger than the viewport. On the other hand, min-height: 100vh allows your element to grow in height if the content exceeds the viewport size.
    Marked as helpful
  • Aakash Verma•9,500
    @skyv26
    Posted 6 months ago

    Hi @a2-112,

    Great job on the project! 🎉 The design is responsive, and your code is clean and easy to read. 👏 However, I have a few suggestions to enhance accessibility and polish:

    1. Alt Text for Images

      • For the image <img src="images/image-qr-code.png" alt="">, please add a meaningful alt text since the image is part of the main content. Alt text helps improve accessibility and ensures the content is understandable for all users, including those relying on screen readers.
      • Example: If the image represents a QR code for a specific action or information, you can write something like:
        <img src="images/image-qr-code.png" alt="QR code description or action.">
      • For decorative images, leaving the alt attribute blank is the right approach, so you're already following best practices there. ✅
    2. Code Clarity and Consistency

      • Your code is already clean, but maintaining consistency in formatting and comments can further enhance readability for collaborators. For instance, a brief comment explaining the purpose of key sections could help future developers understand your work quickly.

    Overall, you're doing fantastic work! 🚀 Keep it up 😊

    Cheers,
    Aakash

    Marked as helpful

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub