Viewport centeted QR-code component

Solution retrospective
First of all, I am really proud of myself for taking the first step in this journey. I enjoy this feeling of tinkering with code and I do not understand how I didn't returned earlier!
What challenges did you encounter, and how did you overcome them?As always, centering a div is a problem. The Problem. My first idea was using Flexbox, but then I was stuck with responsitivity issues. So, I found this solution:
.please_for_gods_sake_just_center_already { position: absolute; top: 50%; left: 50%; margin-right: -50%; transform: translate(-50%, -50%); } There were problems with the QR code image. Still learning how to deal with \<img> scaling. Right now I did it like this: ```css img { width: auto; height: auto; max-width: 300px; max-height: 300px; }
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Egor Pyankov'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