@correlucas
Posted
๐พHi @marchin7, congratulations on your solution!๐ Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw youโre on the right track. Iโve few suggestions for you that you can consider adding to your code:
1.The image is not responsive yet, a quick way to make any image responsive and respecting the container size is to add display: block
and max-width: 100%
to the <img>
selector. To improve the responsiveness even more adding the auto-crop property you can add object-fit: cover
to make the image crop inside the container its inside.
img {
display: block;
object-fit: cover;
max-width: 100%;
}
2.Use units as rem
or em
instead of px
to improve your performance by resizing fonts between different screens and devices.
To save your time you can code your whole page using px
and then in the end use a VsCode plugin called px to rem here's the link โ https://marketplace.visualstudio.com/items?itemName=sainoba.px-to-rem to do the automatic conversion or use this website https://pixelsconverter.com/px-to-rem
Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
โ๏ธ I hope this helps you and happy coding!
Marked as helpful