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 challenge hub

#accessibility
Julieta Perezβ€’ 10

@juliennz

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


Hi. I find it difficult to center the whole div in different screens or even different browsers. I'm unsure about the CSS code, the order of the properties, I know it's really important. It works but I know it could be better, any kind of feedback it's useful.

Community feedback

@msuryaditriputraR

Posted

Hi Julieta Perez πŸ‘‹

Firstly, I wanna congrats you on your success finish this challenge πŸŽ‰

However i have some feedbacks for u 🌼

Accessibility πŸ‘€

  • Wrap all of your content with the main tag. All page content should be contained by landmarks.
  • For heading text use h1 instead of h3 if you just have one heading on your page. Page should contain a level-one heading.
  • Wrap attribution div with footer and place it at the bottom of your page for a better experience, or if you want to keep it at the top wrap it with header.

Code & Design πŸ› 

  • If you want to place your div at the center of the page with position property. You should use transform: translateX(-50%) when you set the left with 50% and transform: translateY(-50%) when you set the top with 50%. or you just need to use transform: translate(-50%,-50%) for shorthand. learn more about translate
  • For best practice and easy way to make content centered is use grid layouting ⚑
main{
    display: grid;
    place-content: center;
    min-height: 100vh;
}

and trada it's magic β˜ƒ . learn more about grid layouting.

I hope this helps, keep it up your good work and Happy Coding β˜•

Marked as helpful

0
Liamβ€’ 30

@bvrkl

Posted

Get familiar with flex box in CSS.

It helps with centering, but has a lot of other functionality to make your sites much more responsive to the screen sizes etc.

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