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

Standard Desktop QR code website using HTML & CSS

univxrse•50
@univxrse
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?

Definitely proud of getting this project to look eerily similar to the original in under a hour. Being familiar with HTML and CSS through freeCodeCamp lessons allowed me to quickly know where to start and what to do. One thing that I would do differently is not spend so much time on one problem that I'm not able to implement.

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

There was one B I G challenge that I encountered and sadly was not able to recreate. It being the slight box shadow under the card which I spent about 15 mins at the end of everything else trying to figure how to make it. It's very subtle and faint if you notice it. Even for the fate of humanity I wasn't able to overcome this problem. sigh.

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

One problem I would like help with is understanding the parent and child relationship css has to its core with elements. I'm not so sure if I did it completely right but eventually I settled on using the margin property to get the div holding the card to the center of the page. Knowing how and where to set up the Display, Justify-content, Text- align properties to get the style on any given area of the webpage would motivate me more than David Goggins running everyday. The other advice I would like some pointers on is how to use a computer and how to use the internet, this is a problem that has puzzled me for centuries.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Atatra•170
    @Atatra
    Posted 11 months ago

    Well done on finishing it so fast! Your retrospective was fun to read.😄

    I don't think it's a bad idea to take more time on stuff you're not acquainted with though. I started this journey with little knowledge of CSS & HTML, and it took me waaaay too long to accomplish my first challenge (well, it still takes me too much time... haha). The reason being I googled every single thing I didn't know. Of course if you're stuck on something for too long, it's better to move on and do what you know, then come back. Just like you did! So it's not a bad thing to do. :)

    For shadows I recommend looking at examples, this is a good start. Search for ones that look close enough to your desired shadow, then tweak it as you please.

    What helped me get of clearer view of how flexboxes work is Flexbox Froggy. It's fun to play and it is quite helpful. When I did the QR Code Component, my thought process was:

    • I need to make the card sits exactly at the middle of the page.
    • For that, my component that will contain the card must take 100% of my viewport's height. (Body or main in this case). One way is with min-height: 100vh (width: 100% for width).
    • Now that my parent component fits the entire height. I can center all its children vertically (it didn't work as expected before, bc my body's height was the height of all its children!) + horizontally. Just as you did, I used display: flex.
    • justify-content: center to align its children along the main-axis (here it is the x-axis because flex-direction is set to row by default).
    • align-items: center to align its child along the other axis.

    At each step, I inspect element my webpage to look at the boxes of each element.. So I know what I'm doing. It helps visualize stuff and realize that every elements are just little boxes with margins & paddings put inside/alongside one another.

    Hope my comment will be useful to you. I may have made some mistakes, so feel free to google it & experiment it on another challenges ! 😁

    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

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