Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

QR code component using html and css

Bandaru Sindhuja•190
@SindhujaBandaru
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This is my 4th project but still i'm struggling to add images to different type of projects.In my browser it shows well but in some deployment apps it isn't showing the image.What should i do?Anyone please suggest me.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

  • Shiva•670
    @shivaprakash-sudo
    Posted almost 3 years ago

    Hello Sindhuja,

    The issue would most probably be related to the path of the image you're providing in the HTML. We have to provide relative paths to the image src attribute, for example, let's consider a project structure as follows.

    QR code component
            images
                   qr-image.png
            index.html
            styles.css
    

    In this case, the image src inside your HTML should have something like ./images/qr-image.png, where one . represents that we're searching something inside the root folder, which in our case is the images folder and inside that we're taking the image.

    I used to have this problem too, but after some researching the above solution was what I found to be helpful. I hope it solves your problem, please let me know if it doesn't.

    Also, the GitHub repository link doesn't seem to work, can you please provide a link to your source code?

    Marked as helpful
  • r2•170
    @r2yo
    Posted almost 3 years ago

    your repository doesn't have an images folder on it so your code can't find the photo you can use the method "add file -> upload file" on GitHub and then drag the images folder into it "not checkmark it"

    but my suggestion is you learn to work with git commands and use this link as a reference

    https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository

    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, SASS, 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