QR code component built for desktop and mobile
Design comparison
Community feedback
- @Bader-IdrisPosted over 1 year ago
You can set the container in the middle of the screen whatever user changes it when you add these properties to it in CSS:
.container { display: absolute; top:50%; left: 50%; transform: translate(-50%, -50%); }
the new feature is transform, it has many lovely properties you can discover, I personally love it. Hope it's useful
Marked as helpful0@DLMedeiroPosted over 1 year agoThanks @Bader-Idris! Had to play with this a bit to figure it out. It seems like every time I try to center a component it comes out differently, but I like the idea of using percentages instead of a set height. To implement this I ended up using "position: absolute" for it to work, and also had to make sure I set the position of my footer as well.
1@Bader-IdrisPosted over 1 year ago@DLMedeiro I appreciate itπ Although if you wanna use one direction you put X as translateX(-50%) horizontality or Vertically as translateY(-50%)
0
Please log in to post a comment
Log in with GitHubJoin 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