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 Card Component

@viveknagesh21

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?

I have try different display layout for this like CSS Grid, CSS Flexbox. I will use Firefox for CSS debugging, it suits me.

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

I initially faced a challenge centering a QR code without a container div or flexbox/grid. I realized that using flexbox would make this task much easier. This is a common challenge when working with HTML and CSS, and flexbox is a powerful tool for overcoming it.

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

I am happy with this method.

Community feedback

P

@justinconnell

Posted

Hi @viveknagesh21, Congratulations on submitting your QR Code solution! the design looks good.

I see you managed to centre the card nicely with FlexBox and having read your comment on how you got to that solution, I agree, FlexBox is great for achieving this goal.

I tried looking at the code repo but the link is broken so I used the browser to take a look at the code and have the following suggestion:

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    /* margin: auto;  -- you don't need this if you set the width*/
   width: 100vw;
    border-radius: 10px;
}

An alternative solution is to use:

.container {
    height: 100vh;
    width: 100vw;
    border-radius: 10px;
    display: grid;
    place-content: center;
}

I hope you find this feedback helpful!

Keep up the great work! J

Marked as helpful

0

@viveknagesh21

Posted

@justinconnell Thanks for the feedback, J. Good point about the margin! I will definitely explore CSS Grids thoroughly.

1

@LuciaVerde

Posted

Hello ! First of all... congratulations on submitting your QR code solution!

Although I am a beginner, I have two suggestions that may be helpful:

  • it's a good practice to use landmarks. You would probably like to wrap this card in a <main> landmark. Landmarks are structural elements that help assistive technologies and users navigate through a web page more efficiently by providing semantic meaning to different sections of the content.

  • It is better for font sizes to use rem instead of px. Rem provides flexibility, accessibility and consistency in web design.

I hope this is useful ! keep going !

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