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 HTML CSS solution

@dimakuznetsow

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


First project here

I'm pretty confident with the final look of the card, but not sure about the code itself.

Particularly I'm not that familiar so far with the position attributes. As for now the card is positioned in the center of the page with 'margin' property. so is the img in the card. But I think there is a more clever way to position all the elements in the center of the page/card etc.

Community feedback

P
EHO 265

@hermannleboss

Posted

Hello, the width of the card is 320px instead of 230 px. It's why your card looks smaller.

And you have to add a padding under the card : the text is near the border.

Then check the accessiblity of your card. You have to add at least a role attr to a makup that defin the landmark.

For exemple for

<div class="box"> 
...
<div/>

add role="main" then you have

<div role="main" class="box"> 
...
<div/>

For more click on this link

https://dequeuniversity.com/rules/axe/4.3/landmark-one-main?application=axeAPI

Marked as helpful

0

@dimakuznetsow

Posted

@hermannleboss I don't get it, when I check the results in the browser everything is just fine with all the padding and size etc. But here on screenshot it's just a disaster, collapsed and not the sizes I wished.

could you please check what is wrong with the issue?

0

@sahand-masoleh

Posted

Hey mate! your page is on https://dimakuznetsow.github.io/qr-code-component/.

As for positioning, using auto margins is one of the ways you can center an element, in fact centering an element is one of the things you will do in CSS the most and the source of many memes and jokes in the community.

You can also try centering with flexbox, grid, and transform: translate().

For this challenge the card is meant to be centered vertically withing the page too, for that you can set a min-height: 100vh on your body element, and then center your card within it.

Marked as helpful

0
P
EHO 265

@hermannleboss

Posted

Hello, your app is not deployed correctly and your publication page seems unavailable. Please check it so I can make beste review.

0

@dimakuznetsow

Posted

@hermannleboss thank you for your help! I checked it and now is everything alright when I look at the project on GitHub Pages, but here on Screenshot it looks completely different.

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