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 Challenge

Soniaβ€’ 10

@soniaela

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


Best practice questions: Should every HTML element be contained within its own <div> even if no styling will be applied to it?

Community feedback

@RibeiroPorto

Posted

Hi Sonia! how are you ? Your project is very good!

Some little tips i think you would enjoy:

  • To make the body fill the entire screen you could use:
          body{
    	width:100%;
    	height:100vh;
    	}
    
    
  • You could also define the background-color inside body instead of creating a div for it.
  • Instead of using padding:200px trying to center your "QR code" card, you could use:
    display: flex;
    justify-content:center;
    align-items:center;
    

I hope you enjoy these small tips, hope it helps you. Any questions feel free to contact me!

Marked as helpful

1

Soniaβ€’ 10

@soniaela

Posted

@RibeiroPorto Hello Vinicius! I complicated myself too much by creating a div for the background, your solution is much cleaner, so I have implemented it. Additionally, thank you for the height: 100vh line! I could not figure out how to fix this problem, and this line solved it. Again, many thanks for your help. It's very much needed at my early stage!

1
Eileen dangeloβ€’ 1,600

@Eileenpk

Posted

Hi Sonia! Congrats on your first Frontend Mentor challenge!! πŸŽ‰πŸŽ‰πŸŽ‰ your project looks good, to answer your question no each element does not need to be in its own <div>. Also here is a link to a very useful article that talks about semantic HTML that I think you will find helpful. https://dev.to/kenbellows/stop-using-so-many-divs-an-intro-to-semantic-html-3i9i

Hope this was helpful, and if so please mark it as helpful :)

Marked as helpful

1

Soniaβ€’ 10

@soniaela

Posted

@Eileenpk Thanks a lot for taking the time to go through my newbie solution! I have replaced the divs with semantic tags to increase accessibility.

0
Eileen dangeloβ€’ 1,600

@Eileenpk

Posted

Awesome Sonia, I'm so glad I could help, keep up the great work!

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