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

Alief Ardiansyahโ€ข 40

@aliefardiansyah

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


  1. Yes, I found it difficult to make the card in the middle.
  2. Card code about padding and space.
  3. For right now , I don't have a question.

Community feedback

Lucas ๐Ÿ‘พโ€ข 104,420

@correlucas

Posted

๐Ÿ‘พHi @kaptenEscanor, congratulations on your solution!๐Ÿ‘‹ Welcome to the Frontend Mentor Coding Community!

Great solution and a great start! From what I saw youโ€™re on the right track. Iโ€™ve few suggestions for you that you can consider adding to your code:

Use <main> instead of a simple <div> this way you improve the semantics and accessibility showing which is the main block of content on this page. Remember that every page should have a <main> block and that <div> doesn't have any semantic meaning.

The main heading has the tag <h5>, in this case, you should replace it with <h1> since this heading is the main title on this page. Remember that every page should have one <h1> to declare which is the most important title and that you should follow the hierarchy using the heading sequence (h1, h2, h3, h4, h5) and never jump a level.

Clean your code by removing some unnecessary divs, most of the content can stand alone without a div. Use div only for blocks that need a special alignment or the content needs a special positioning.

Add a margin of around margin: 20px to avoid the card touching the screen edges while it scales down.

Use relative units as rem or em instead of px to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.

Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR

โœŒ๏ธ I hope this helps you and happy coding!

Marked as helpful

1

Alief Ardiansyahโ€ข 40

@aliefardiansyah

Posted

@correlucas Thank you very much for your feedback and your advice.I will try to do what you suggest.

0
Faris Thibaniโ€ข 220

@Faris-Thibani

Posted

Hey congrats on completing the project! Here is a tip to center items in the middle. 1) create a wrap for the content and set the display as flex... e.g <div style=" display:flex"> then justify-content center and align-self the child of the wrap, flex-item or the main container to center. Hope this helps. if you want more feedback and support let me know!

1

Alief Ardiansyahโ€ข 40

@aliefardiansyah

Posted

@Faris-Thibani I thank you for your feedback. If you don't mind, I hope to get more feedback.

1
Faris Thibaniโ€ข 220

@Faris-Thibani

Posted

@kaptenEscanor Ofcourse.. CSS flexbox is a great way to center items.. it allows you to align items based on the flex-direction or the direction of the main axis and the cross axis. For example, it's useful for navigation bars to space the items accordingly.. if you are interested to learn flex-box checkout this short course by Wes Bos: https://flexbox.io/ I'm currently learning flexbox and i think you'll find it very useful to explain all the CSS flexbox properties and get some practice with them.

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