Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 month ago

Responsive QR Code Component

pure-css
Twilight Silver•120
@twilight-silver
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'm most proud of the fact i was able to do everything with pure css and that i didn't have to use media port for the responsiveness...

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

The challenge i encountered was how differently the pages rendered on github are compared to what you would see yourself through live server...

I had to use inspect on a github rendered site to make the changes

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

How to probably make sites in a way github pages wouldnt change If you get what i mean

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Harsh Kumar•3,410
    @thisisharsh7
    Posted about 1 month ago

    Yes — this is a common issue! On Live Server, your computer runs the project in a more forgiving way. But GitHub Pages is stricter because:

    • It uses a real web server (with HTTPS), so things like incorrect file paths or folder names can break the design.
    • It is case-sensitive — for example, Images/photo.png will not load if the actual folder is images/.
    • It does not always refresh the latest version — sometimes you need to clear cache or hard reload (Ctrl + Shift + R).
    • If your CSS or images don’t load, GitHub might be looking in the wrong folder (especially if paths like /images/... are used instead of ./images/...).

    How to make sure GitHub Pages shows it exactly like Live Server:

    • ✅ Use relative paths for CSS and images like ./style.css or ./images/photo.png.
    • ✅ Keep your HTML, CSS, and images in the same folder (or double-check your folders and file names).
    • ✅ When in doubt, copy your CSS into a <style> tag in your HTML — that avoids linking issues.
    • ✅ Avoid using / at the start of image paths — that points to the root of the domain, not your project folder.
    • ✅ Use GitHub's own link to view the live site — don’t rely on previews alone.

    Bonus Tip: If you created a CNAME file, that’s for setting a custom domain. If you’re using it, make sure your domain DNS is set correctly — or remove the CNAME for now to avoid confusion while testing.

    If you're still unsure or want help with GitHub Pages setup or deployment, feel free to ask — happy to guide you step-by-step!

    Additional tips:

    • Consider using semantic HTML tags like <section> or <article> for your card instead of generic <div>s.
    • To improve accessibility, add descriptive alt text for images instead of using background images.
    • Try to avoid fixed widths in vw without minimum pixel sizes to ensure usability on very small or very large screens.

    Keep practicing, you’re making excellent progress!

  • Julio Garcia•270
    @julioedi
    Posted about 1 month ago

    Good one, remember to remove missing assets, you got style.css link at<head/> tag.

    Responsive @media is missing for a responsive part.

    For the next projects, you can use:

    *{
      box-sizing: border-box;
    }
    

    That's for options like padding, are include inside of the containers size

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