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

Junious 40

@Junious1

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

Henoc 200

@henoceli3

Posted

C'est bien, mais évite d'importer quand tu ne veux pas utiliser. Good Job 💪

Marked as helpful

0

Junious 40

@Junious1

Posted

@henoceli3 merci tout a été modifié

0
Hassia Issah 50,670

@Hassiai

Posted

Replace<div class="main-code">with the main tag, <p class="first"> with <h1> and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html

Give .text a margin value for all the sides, text-align: center and a font-size of 15px which is 0.9375rem, this will be the font-size of both p and h1. Give p a margin-top or h1 a margin-bottom value for the space between the text.

There is no need to style. image, give the img a max-width of 100% for a responsive image and a border-radius value, the rest are not needed.

There is no need to give the body a background-color of white.

Replace the height in .main-code with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement. padding: 16px

For a responsive content, give .main-code a a fixed max-width value. max-width: 320px

To center .main--code on the page using flexbox or grid instead of position: absolute, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.

USING FLEXBOX:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
USING GRID:
body{
min-height: 100vh;
display: grid;
place-items: center;
}

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

0

Junious 40

@Junious1

Posted

@Hassiai thanks for your help

0
Atif Iqbal 3,200

@atif-dev

Posted

Hi Junious, congrats🎉 on completing the challenge. Better take care about following points.

  • Always check Frontendmentor Report Generator issues after submitting the project for removing errors and warnings. To avoid accessibility issue "All page content should be contained by landmarks" use code as :
<body>
    <main>
        ---your code here----
    </main>
  <footer>
  </footer>
</body>

(why main matters? Read here)

  • Better use the following simple code block for centering the container(whole card) vertically and horizontally:
body {
    min-height: 100vh;
    display: grid;
    place-content: center;
}

Or you can learn centering from here.

  • Remove height: 55vh; from .main-code selector for better display of bottom text.
  • There are responsiveness issues in your solution. Now a days responsiveness matters a lot.If you don't know much about responsiveness, you can learn from FreeCodeCamp or you can check out this free intro course for getting started in responsiveness.
  • When we open GitHub repository link, at right side you will find an About Section. There, also include live preview link of your project. It is better for someone to check your live project while interacting with code.

Hope you will find this Feedback Helpful.

Marked as helpful

0

Junious 40

@Junious1

Posted

@atif-dev thanks for your 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