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

CSS old fashion

Abbas 10

@abbas-devlop

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 would use flexbox to center the div instead of the old way where we use position absolute

Community feedback

P

@slightlybelowzen

Posted

  • The <h2> element hasn't been sized correctly. The design spec uses 22px to style it, and since no size has been specified in the css, it defaults to the browser default of 1.5em which is 24px assuming a base font size of 16px (also since the base font size hasn't been set in the css for the body element.
  • It's a good idea to apply a reset of
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

so you don't have default margins of elements messing with spacing and padding of elements.

Marked as helpful

2

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