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

My first challenge - QR code

John Koenβ€’ 20

@jlkoen

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


This is my first time writing HTML & CSS from scratch. I know I have a long way to go. Please suggest any improvements I could make to the CSS, I tried to keep things simple.

Community feedback

Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

Hello there πŸ‘‹. Congratulations on successfully completing the challenge! πŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

CSS 🎨:

  • Looks like the component has not been centered properly. So let me explain, How you can easily center the component without using margin or padding.
  • We don't need to use margin and padding to center the component both horizontally & vertically. Because using margin or padding will not dynamical centers our component at all states
  • You already using Flexbox for layout, but you didn't utilized it's full potential. Just add the following rules to properly center the component.
body {
min-height: 100vh;
justify-content-center;
align-items: center;
}
  • Now remove these styles, after removing you can able to see the changes
.outer {
margin: 20px auto;
}
  • Now your component has been properly centered

.

I hope you find this helpful πŸ˜„ Above all, the solution you submitted is great !

Happy coding!

Marked as helpful

1

John Koenβ€’ 20

@jlkoen

Posted

@0xAbdulKhalid Thank you very much for the feedback. I will add those changes and see how it looks.

0
_nehalπŸ’Žβ€’ 6,710

@NehalSahu8055

Posted

Hello Coder πŸ‘‹.

Congratulations on successfully completing the challenge! πŸŽ‰

Few suggestions regarding design.

  • Remove margins from .outer as this will not dynamically center the card and add min-height:100vh to properly center the card.

  • Use Semantics for the proper design of your code.

<main>...</main>
<footer>...</footer>
wrap up `.attribtution` div inside your footer.
</body>
  • For non-decorative images give meaningful and descriptive alt like alt= "QR code to frontend mentor website".

  • Use responsive units(rem, em, %) from next project. Explore respective use cases on google.

  • Replace width with max-width to make your card more responsive.

link.

I hope you find this helpful.

Happy codingπŸ˜„

Marked as helpful

1

John Koenβ€’ 20

@jlkoen

Posted

@NehalSahu8055 Thank you for the detailed reply. I'll have a look at responsive units, haven't used those before.

1
Aarynβ€’ 130

@Aaryn-Robinson

Posted

Good Job, John. Responsive on my end . Id download the design files provided by the platform so you can get the font-sizes and margins.Change the font weight on the paragraph and the text color and its perfect. But this is a great start! Being that it's your first time writing HTML and CSS you will only get better. Good job!

Marked as helpful

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