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

Responsive page using css

@AmritRijal-cpp

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


Q: What did you find difficult while building the project? A: Centralizing the #main id was hard.

Q: Which areas of your code are you unsure of? A: CSS code of centralizing the QR image. I moved the image with relative positioning and I think there is a better way to do it.

Q: Do you have any questions about best practices? A: What will be the best practice for a responsive website?

Community feedback

Adriano 33,990

@AdrianoEscarabote

Posted

Hi Amrit Rijal, how are you? Welcome to the front-end mentor community! I really liked the result of your project, but I have some tips that I think you will enjoy:

To improve the accessibility of the project you could have put an h1. Every page must contain a level 1 header, for people who use screen readers, identity what the main title is and follow the sequence h1-h5

<h1 class="p1">Improve your front-end skills by building projects</h1>

Document should have one main landmark, this problem is being caused by the fact that there is no main tag around the main content of the page! Since this challenge is based on only one component, there is no other component more important than it on this page, so to solve this, wrap all the content with the main tag,

It's always good to pay attention to the correct use of semantic html elements, as they are extremely important for people who use screen readers, to know what the main content of the page is in the case of the main tag!

Avoid using px, If your web content font sizes are set to absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. if you want to keep using px for development and then format the whole code to rem, you can use this vscode extension: px to rem

The rest is great!

I hope it helps... 👍

Marked as helpful

1
Travolgi 🍕 31,500

@denielden

Posted

Hello Amrit, You have done a great work! 😁

Some little tips to improve your code:

  • add main tag and wrap the card for improve the Accessibility
  • also you can use article tag instead of a simple div to the container card for improve the Accessibility
  • use h1 instead of a simple p for the text of card
  • centering a div with absolute positioning is now deprecated, it uses modern css like flexbox or grid
  • use flexbox to the body to center the card. Read here -> best flex guide
  • after, add min-height: 100vh to body because Flexbox aligns child items to the size of the parent container
  • instead of using px use relative units of measurement like rem -> read here

Keep learning how to code with your amazing solutions to challenges.

Hope this help 😉 and Happy coding! by Den

Marked as helpful

1
yishak abrham 2,150

@yishak621

Posted

Good work ..and a answer to ur question to center an item use these method ...justify content will move the flex to horizontal center and align items will vertically center items to center but don't forget to add min-height since it will determine the vertical space that container will contains

/*Container card*/ 
 .center { 
   display: flex; 
   justify-content: center; 
   align-items: center; 
   min-height: 100vh; 
 }

Marked as helpful

1

@caarlosdamian

Posted

Hello Amrit, You have done a good work! 😁

Some little tips to improve your code:

add main tag and wrap the main content of the page for improve the Accessibility add descriptive text in the alt attribute of the images

instead of using px use relative units of measurement like rem -> read here Keep learning how to code with your amazing solutions to challenges.

Hope this help 😉 and Happy coding!

Marked as helpful

1

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