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

Nnannaβ€’ 50

@Nnanna777

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


Really want to learn as only just started

Any advice/tips are appreciated

Community feedback

Nikolas Papenfusβ€’ 380

@NPM0486

Posted

πŸ‘‹Hi, you did a great job with this challenge!

I have some hints that you might find useful.πŸ‘€

  • I see that you didn't add the font that was available in the information added to the challenge. To add the font you need to:
  1. open the link provided in the documentation
  2. select the appropriate thicknesses that you are interested in/are given in the documentation.
  3. a panel will appear on the right side along with two code snippets.
  4. you paste the <link> codes in the head in html.
  5. you use the font family code in css
  • I see that you wanted to center the whole thing using the margin. Try using flex or grid. Here you have helpful documentation.
  1. πŸ“™flex
  2. πŸ“˜grid
  • For example, like this:
main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

"What we know is a drop, what we don't know is an ocean." ~Isaac Newton

Have fun coding!πŸŽ‡

Marked as helpful

0

Nnannaβ€’ 50

@Nnanna777

Posted

@NPM0486 yes I did omit the font

I tried margin: 0 auto to center but that only centered it to the top of the page, any idea why that didn't work

0
Nnannaβ€’ 50

@Nnanna777

Posted

@NPM0486 plus explain height; 100vh;

0
Nikolas Papenfusβ€’ 380

@NPM0486

Posted

@Nnanna777πŸ‘€

  • Most likely, the container in which you wanted to center did not have a height defined.

  • 100vh is one hundred points of screen height. Vh is the unit that divides our screen into 100 parts and 1vh is 1% of the screen height. I added it in this example to make the container full screen so that we would have our module perfectly in the center of the screen.

You can read more about it πŸ‘‰here

Marked as helpful

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