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 page using CSS Flexbox

Otim Dan 30

@otimdan

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


What are you most proud of, and what would you do differently next time?

I happy to have implemented the website without doing any copy and paste from existing solutions but purely my own knowledge of HTML and CSS

What challenges did you encounter, and how did you overcome them?

I took me a while to figure this yet it looks so simple. I encountered challenges on working with the box model i.e padding, margins to fit the original design.

What specific areas of your project would you like help with?

I would like help on how I would have approached it better, or in a more efficient way on the side of CSS

Community feedback

Huy Phan 1,860

@huyphan2210

Posted

Hi, @otimdan,

I took a look at your solution and wanted to share some thoughts:

  • Your .card isn’t centered on the page because the body doesn’t fill the entire viewport. The viewport is the visible area of the web page. To ensure the body occupies the full height of the viewport, you should apply min-height: 100vh to the body. This is a good practice because it guarantees that your layout will be responsive and adapt well to different screen sizes. You can also make the body a flexbox to center your .container like this:
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
  • Additionally, consider using semantic HTML elements instead of relying solely on <div>. Semantic elements, like <header>, <footer>, and <main>, provide meaning to the structure of your document and improve accessibility, making it easier for both developers and search engines to understand the content.

Let me know if you have any questions! Hope this helps!

Marked as helpful

0

Otim Dan 30

@otimdan

Posted

@huyphan2210 Thank you for the feedback, I'll edit my code and read more on viewports and better HTML semantic elements.

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