Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 2 years ago

QR code component using Bootstrap

bootstrap
AbalJerind•370
@Abaljerind
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello all, i got a problem with centering the figure using bootstrap. So, i can place the figure in the top middle of the window browser using bootstrap, but what i want is that i can also make it go down right in the middle of the window using bootstrap, but i just can't, so i cheat it using margin in my app.css file so the figure can get to the center of it. Can anyone please tell me how to fix it using bootstrap?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Guo Xusheng•90
    @mvpsheng
    Posted about 2 years ago

    hello, I just came across the same problem, and my solution is to give your component a parent tag, and make the parent tag to be a flex layout. And then you can put your component center both horizontally and vertically.

    If you don't know flex layout, check out the MDN, and learn about that. I hope this helps. Hope you doing well!

  • Abdul Khaliq 🚀•72,360
    @0xabdulkhaliq
    Posted about 2 years ago

    Hello there 👋. Congratulations on successfully completing the challenge! 🎉

    • I have other recommendations regarding your code that I believe will be of great interest to you.

    QR iMAGE ALT TEXT 📸:

    • The QR Code Component involves scanning the QR code, the image is not a decoration, so it must have an alt attribute which should explain the purpose of the image.

    • The alt with QR code is not even explaining for what the QR image need to be used.

    • So update the alt with meaningful text which explains like QR code to frontendmentor.io

    Example

    <img src="/images/image-qr-code.png" alt="QR code to frontendmentor.io">
    

    .

    I hope you find this helpful 😄 Above all, the solution you submitted is great !

    Happy coding!

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub