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

QR-Code Challenge using CSS Flexbox and Semantic HTML5

Gabriel Rodriguez Perez•160
@glrodriperez98
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?

What I am most proud of is my grasping the foundations of having a scalable website that responds well on both desktop and mobile. It is an issue I have had with my personal portfolio page and I managed to use availbe resources to understand it for this project and will apply them on a greater scale for my portfolio. Here is an example code that I'm proud of:

css
.qr-code img {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 10px;
}

What I would do differently next time which was suggested at the beginning of the project is focus on structuring the html entirely before moving to the styling. While it didn't impact me that much with a bigger project I can see where things would get complicated.

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

My biggest challenge was understanding how to build components with reusable CSS. I overcame them by using the offline CSS resources I found to try and reuse as much script as possible without creating new css code to style the project.

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

My specific area that I would like help in is reusing CSS code. I'm struggling to determine when to use Flexbox or Flex grid for example, and then understanding how to factor that into the entire design of a project.

With this project, I'm not sure if it's possible but I would love to know if theres a way to cut down the amount of CSS that I used and make it more efficient and easier to read to a third party reviewing my code.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Katherine-Kapinus•60
    @Katherine-Kapinus
    Posted 4 months ago

    hello! Your code looks great✨ Here are a few suggestions to improve it semantically:

    <main class="container"> <div class="qr-code"> <img src="./images/image-qr-code.png" alt="Scan this QR code to visit Frontend Mentor"> </div> <h1 class="blurb-1">Improve your front-end skills by building projects</h1> <p class="blurb-2"> Scan the QR code to visit Frontend Mentor and take your coding skills to the next level. </p> </main>

    Your styles look clean and well-organized 👌

    A few additional tips: Consider using utility-first class naming to make this block more reusable in larger projects.

    You can try the Figma plugin "Weblify Code Inspector" — it helps get precise px values from the layout and works great as a developer panel replacement.

    And finally, I’d recommend giving SCSS a try — it’s a CSS preprocessor that can really simplify your workflow as your projects grow.

    It might feel unfamiliar at first, but once you get used to it — it’s hard to go back! Definitely worth exploring 😊

    Keep it up — you’re doing great! 🌟

    Marked as helpful
  • hayasamir•10
    @hayasamir
    Posted 4 months ago

    واجهني صعوبة فقط في نشر الموقع

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

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