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 Card Component | HTML and CSS

Edikanβ€’ 10

@eeakpan

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


I found that getting centering the text was a bit challenging. I went to Free Code Camp and saw a tutorial on how to create a card image for a website.

Community feedback

Olaniyi Ezekielβ€’ 7,600

@Ezekiel225

Posted

Hello there πŸ‘‹ @eeakpan.

Good job on completing the challenge !

Your project looks really good!

I have suggestions about your code that might interest you.

Consider adding a min-height of 100vh to the body element so as to centralize your project.

body { 
  min-height: 100vh;
  align-items: center;
  display: flex;
  justify-content: center;
}

I hope it helps!

Other than that, great job!

Happy coding.

0
Craigβ€’ 190

@cchivers

Posted

One of the best ways to center a card would be.

(html parent element) {
    display: flex;
    align-items: center;
    justify-contents: center;
}

For the justify-contents you need to make sure you have a height set for your parent container. This will center an item.

Another pointer if you want to move your tag to the bottom is:

.attributes {
    position: absolute;
    bottom: 0;
    width: 100%;
}

I do this just to move the attributes tag to the bottom of the page and out of my way.

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