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 UI

@Temitope15

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


While building the project, I tried to center the card div using flexbox, but it was not responding. I gave the parent container a display flex property, align items center and justify content center property. I'm I missing out something? Nonetheless, i used the transform : translate() function to center it eventually. How do you think I can refactor my code using the flexbox model?

Community feedback

@Deeokafor

Posted

Hello Temitope, I just checked out your project, nice try, keep pushing. I would want to point out a few things.

  1. To centre the card, you must first ensure that the parent div takes up the full height and width of your viewport like say 100vw and 100vh. Then, applying Flexbox, aligning and justify items/content might produce the desired effect.

  2. Try to stick to the fonts provided for you in the style-guide.md. They can be mostly found on google fonts.

  3. Play with opacity to find the best fit for each design you find it in.

Marked as helpful

1

@Temitope15

Posted

@Deeokafor thank you so much for these reviews, I will refactor my code and keep you posted. Thank you so much for your time

1

@Temitope15

Posted

I have updated my code base now, check it out:

I had to use the overflow : hidden property in my css because the 100vh and 100vw I applied made the page to flicker. I tried removing the padding and margin in the formatter '*{what i want to format}" but it was still flickering. so the overflow:hidden helped me remove it. Is there a way I can make it not to flicker without using the overflow : hidden property?

0

@Temitope15

Posted

@Deeokafor when the overflow-x is showing. Which means the width is more than 100%, so the webpage will have to expand, which will cause users to scroll left and right to see contents in the webpage.

0

@Kingsley-Aggrey

Posted

Giving the Container the display of flex ,justify to center and align to center should be able to center it children, if you are still getting problems makes sure the Container fill the entire screen by setting it width to 100vw and height to 100%. I hope this helps

Marked as helpful

1

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