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

Used basic css and Css flexbox

Andi Gashi 350

@Andigashi1

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

Ecem Gokdogan 9,380

@ecemgo

Posted

Some recommendations regarding your code that could be of interest to you.

HTML

In order to fix the accessibility issue:

  • You need to replace <div class="container"> with the <main class="container"> tag. You'd better use Semantic HTML, and you can also reach more information about it from Using Semantic HTML Tags Correctly.
  • Each main content needs to start with an h1 element. Your accessibility report states page should contain a level-one heading. So, you need to use a <h1> element in the <main> tag. You can replace your <h2>Improve your front-end skills by building projects</h2> element with the <h1>Improve your front-end skills by building projects</h1> element.

CSS

  • If you want to center it correctly, you can use flexbox in the body and also you can use the recommended color for the background in body:
body {
  background-color: hsl(212, 45%, 89%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
  • after using flexbox in the body, the .container is updated a little bit
.container {
  background: white;
  max-width: 20rem;
  border-radius: 20px;
  padding: 1.2rem;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

Hope I am helpful. :)

Marked as helpful

0

Andi Gashi 350

@Andigashi1

Posted

@ecemgo thanks for the corrections and the tips will do my best to use them from now on

1
Ecem Gokdogan 9,380

@ecemgo

Posted

@Andigashi1 I'm happy to help! :)

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