Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

Simple HTML and CSS Landing Page for FrontEnd Mentor QR Code

Joshua Okidi•10
@Joshua-Okidi
A solution to the QR code component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I am proud of how I was able to keep the QR code and it's content in the middle of the webpage. This CSS code:

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);```

I hope to make use of bootstrap and design the webpage to be more interactive next time.

### What challenges did you encounter, and how did you overcome them?
I encountered challenges such as;
1. How to make the div and image stay in the middle.
2. How to curve around the edges of the scanner image.
3. The texts were warping and the image shrinking while I resized the window.

How I overcame the above challenges(respectively);
1. I checked different resources and was able to use the `top`, `bottom` and `transform:translate(-50%, -50)` to keep the div and the image at the center.
2. I simply used the CSS: `border-radius` on the `img` element.
3. I found out the warping texts and shrinking QR code image were simply because I used `max-width` for my contents, so any size of the page, it had to readjust. As soon as I changed it to `width`, everything was settled!

### What specific areas of your project would you like help with?
1. I wasn't able to use the specific sizes given in the `style-guide.md`. How was I supposed to use those sizes?
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Joshua Okidi's solution.

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

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

Frontend Mentor

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

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