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 GENERATOR

@khushi-2002

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

Eric 60

@Ericodesenvolvedor

Posted

body { background-color: hsl(212, 45%, 89%); text-align: center; width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; margin: 0; padding: 0; }

.main-block { width: 20%; padding: 15px; background-color: white; border-radius: 15px; }

  • Vai ficar um pouco mais centralizado, o seu projeto estava para o lado direito da tela ,-,

Marked as helpful

0

@khushi-2002

Posted

@Ericodesenvolvedor muchas gracias!

1
Ahmed Bayoumi 6,740

@Bayoumi-dev

Posted

Hey Khushi, Congratulations on completing this challenge... You have accessibility issues that need to fix.

  • Document should have one main landmark, Contain the component with <main>.
<main>
   <div class="main-block">
      //...
   </div>
</main>
  • Page should contain a level-one heading, Change <div class="body-block"> to <h1 class="body-block"> You should always have one h1 per page of the document... in this challenge, you will use h1 just to avoid the accessibility issue that appears in the challenge report... but don't use h1 on small components <h1> should represent the main heading for the whole page, and for the best practice use only one <h1> per page. There are six levels of section headings <h1> to <h6>

  • This <div class="body-block1">Scan the QR code to visit Frontend Mentor and take your coding skills to the next level </div> describes the card, So you should use the paragraph element <p> instead of <div>.

  • I suggest you center the component on the page with Flexbox, by giving the parent element <main> the following properties:

body {
  background-color: hsl(212, 45%, 89%);
  /* text-align: center;    <---Remove  */
  /* width: 90rem;    <---Remove  */
}

main {     /* <---- Add */
   display: flex;
   justify-content: center;
   align-items: center;
   min-height: 100vh;
 }  

.main-block { 
 width: 300px;     /* <---- Changed */
 padding: 15px;
 text-align: center;     /* <---- Add */
 background-color: white;
 border-radius: 15px;
 /* display: inline-block;    <---Remove  */
 /* position: absolute;    <---Remove  */
 /* top:25%;    <---Remove  */
}

Hope this help!... Keep coding👍

Marked as helpful

0

@khushi-2002

Posted

@Bayoumi-dev Thankyou so much, I'll update my solution

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