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 Flex, SCSS

#sass/scss
Tux3er 760

@Tux3er-Isma

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


It was an easy challenge

Community feedback

Travolgi 🍕 31,480

@denielden

Posted

Hello Ismail, You have done a good work! 😁

Some little tips to improve your code:

  • use main tag to wrap the card and improve the Accessibility but not as a container of that one element
  • centering a div with absolute positioning is now deprecated, it uses modern css like flexbox or grid
  • use flexbox to the body to center the card. Read here -> best flex guide
  • after, add min-height: 100vh to body because Flexbox aligns child items to the size of the parent container
  • instead of using px or % use relative units of measurement like rem -> read here

Keep learning how to code with your amazing solutions to challenges.

Hope this help 😉 and Happy coding!

0
P
Dana Hong 340

@Dana-Hong

Posted

Hey Ismail,

Good effort with this challenge. I noticed that your QR image is not centered and that you were using position to center elements. Here are some tips to consider:

It's much easier to center elements by either using

  1. flexbox, or
  2. margin: 0 auto if the child element has a set width.

For example, your .main__card__thumbnail has a set width of 250px. You can simply remove position-related properties like position: relative and left: 3%, set the margin to margin: 0 auto, and give it display: block. This will save you time, as you don't have to tinker around with percentages trying to get it perfectly centered.

You can also look into short-hand properties; for example, you can write border-radius: 10px instead of border-radius: 10px 10px 10px 10px to save you time.

Hope this helps!

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