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

position border-radius margin font-size font-weight background-color

Mahdi 10

@degmaa

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 challenges did you encounter, and how did you overcome them?

challenge: the best position of QR-code was hard to find for me. solution: I tried every number for margin.

Community feedback

@TedJenkler

Posted

Hi @degmaa,

Nice project! Here are a couple more tips:

Positioning Trick: To center a card or element without using Flexbox, you can set its position to absolute, then use left: 50%, top: 50%, and transform: translate(-50%, -50%). This technique is great for centering elements both horizontally and vertically.

ARIA Labels for Accessibility: If you're unsure which semantic HTML element to use, opt for a <div> with an aria-label instead. This approach enhances accessibility, especially since the <center> tag is no longer valid in modern HTML and is only retained for compatibility with older codebases. ARIA labels help screen readers understand the purpose of your content.

Hope these tips help!

Best, Teodor

Marked as helpful

1
Luka-998 70

@Luka-998

Posted

Hi!

Congratulations on solving you QR-code. I just checked your site > inspect and I noticed that you did not use any <div> or <section> element. <div> is great and should be used for making boxes ("containers"). You could make 1 outside div (parent container) and 1 inside div (child container- which would represent part of qr code itself). They are easy to position and modify once you get the understanding of flexbox. display: flex; flex-direction: (choose the direction of element and you are ready to rock) That is how i did it. Strongly encourage you to check, flexbox

Marked as helpful

0

Mahdi 10

@degmaa

Posted

@Luka-998 I haven't studied about flexbox yet. I just wanted to try my coding skill and also understanding how this site work, but anyway. thanks for your comment and time.

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