Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR Code Component Solution - updated 6/21/24

chrisk71 40

@chrisk71

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


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

6/21/24 - I've updated my solution based on feedback from members. I hope I updated my solution the correct way here... Anyway, I had problems with positioning the 'attribution' text below the flex container without affecting the positioning. I still had issues with positioning the flexbox container on the screen - justify-content and align-items weren't working - but I found this article about using 'margin: auto' and that worked. Wish I knew why justify- and align- didn't work on the flex container but worked on the internal flex items.

This was a good challenge for me after watching several beginner courses on YouTube. I struggled a bit but felt that I learned a lot about troubleshooting html and css issues.

Next steps: read through the MDN docs and watch a few more courses, then tackle the next challenge.

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

I encountered issues with sizing the elements in CSS.

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

I'd appreciate it if a more experienced dev can give me feedback on my html and css structure and what I could've done differently.

Community feedback

Daniel 🛸 44,240

@danielmrz-dev

Posted

Hello there!

Congrats on completing the challenge!

Your project is looking fantastic!

I'd like to suggest a way to make it even better:

  • Using margin and/or padding isn't always the most effective method for centering an element.

Here's a highly efficient approach to position an element at the center of the page both vertically and horizontally:

📌 Apply this CSS to the body (avoid using position or margins in order to work correctly):

body {
    min-height: 100vh;
    display: flex; 
    justify-content: center;
    align-items: center;
}

I hope you find this helpful!

Keep up the excellent work!

Marked as helpful

0

chrisk71 40

@chrisk71

Posted

@danielmrz-dev Thanks for taking a look! I appreciate the tips about positioning, no wonder I had trouble! I'll use your example and read up on positioning before updating my submission.

1
T
Grace 28,810

@grace-snow

Posted

I give feedback on this a lot and it’s almost always the same things as this is the challenge to lay down important foundations.

So rather than repeat myself I’m going to point you to read others feedback I’ve left on this challenge.

For example, see my comments on this person’s solution and use those learnings to refactor yours.

Also note we cannot see your code from the code link above. I expect you've made the repo private but that means no one can review your code.

Marked as helpful

0

chrisk71 40

@chrisk71

Posted

@grace-snow I appreciate you letting me know you can't see my code. I just changed my repo to Public. I'll check out the link to your comments.

0

Please log in to post a comment

Log in with GitHub
Discord logo

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