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 using html and css

@Procodx

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Vincent Danielβ€’ 410

@davinceey

Posted

Hello Akinrinlola olamide. Congratulations on your first project! Just some little tips for improvement:

  1. You could make use of the display: flex to centralize your solution. You could make use of this code:
body{
display: flex;
justify-content: center;
align-items: center;
}
  1. You could wrap all your content with the <main> tag and then make use if the h1 tag as a level-one heading. It would be perfect if it replaces the h3 tag used in your code and it would help in improving Accessibility.

  2. You could also make use of relative units like the em and rem units for your font-sizes, padding, margins and widths. This would help to improve your site's responsiveness.

Hope this helps you. Happy Coding!πŸ‘Š

Marked as helpful

0
Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHi @Procodx, congratulations for your first solution!πŸ‘‹ Welcome to the Frontend Mentor Coding Community!

Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:

1.Use <main> instead of <div> to wrap the card container. This way you show that this is the main block of content and also replace the div with a semantic tag.

2.Replace the <h3> containing the main title with <h1> note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in level of importance, never jump a level.

3.Use 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.

4.Your component is okay but it's missing the vertical alignment. The best way to do it is by using flexbox. First step is to add min-height: 100vh to make the body height size becomes 100% of the screen height, this way you make sure that whatever the situation the child element (the container) align the body and then use the flex properties for alignment with display: flex / align-items: center; / justify-content: center;

body {
    MIN-HEIGHT: 100VH;
    background-color: hsl(212, 45%, 89%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

✌️ I hope this helps you and happy coding!

Marked as helpful

0

@Procodx

Posted

@correlucas thank you very much for your corrections ....uve thought me new things 😊🧑

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