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

W3schools, CSS flexbox

@INS140

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


The most difficult part for me was figuring out how to center the div element. W3school's CSS tutorial was very helpful in finding the answers I needed.

I am open to feedback on how I could have done this better. Anything helps really.

Community feedback

Adriano 34,090

@AdrianoEscarabote

Posted

Hi Isaac Saettel, 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:

  • every Html document must contain the main tag, so we can identify the main content, to fix this, wrap all the content with the main tag. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.
  • Consider using rem for font size .If your web content font sizes are set in 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. Relative units “stretch” according to the screen size and/or user’s preferred font size, and work on a large range of devices.

The rest is great!

I hope it helps... 👍

Marked as helpful

0

@INS140

Posted

@AdrianoEscarabote I'm doing well, and I'm excited to try and tackle a few more challenges. Thanks for the tips on accessibility! I hope to create projects that are well designed and accessible, so I will definitely be using these tips on my future projects as well.

0
Adriano 34,090

@AdrianoEscarabote

Posted

@INS140 happy coding!!

0
Adeola Ganiu 1,320

@Deolabest

Posted

Hey @INS140, Congratulations on completing this challenge!

Here is my feedback:

  • It's not a good practice to use px to set font-size. Instead use rem units, they are great since they adapt better to the font-size the user will set in the browser settings. You can convert from px to rem here: https://pixelsconverter.com/px-to-rem.

  • Use <main> instead of a simple <div> to improve the semantics and accessibility on the page. Remember that every page should have a <main> block and that <div> doesn't have any semantic meaning.

  • To center a container in the body of the page, just do this:

body {
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: flex;
}

Keep doing a good job!

Marked as helpful

0

@INS140

Posted

@Deolabest Thanks for the great tips! I hadn't looked into flexbox very much before this challenge, but studying the code you presented showed me why it is a better alternative to just setting the margins. I'll be sure to use these tips when I attempt some of the other challenges.

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