Design comparison
Community feedback
- @correlucasPosted about 2 years ago
πΎHello @samantha-lind, Congratulations on completing this challenge!
Iβve few suggestions for you that you can consider adding to your code:
1.Use units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but all sizes as well.IMPROVE YOUR WORKFLOW
using VSCODE you can code your whole page usingpx
and then in the end use a 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-rem2.To reduce your CSS file and improve the performance of loading your page you can use a tool called
CSS minify
that reduces the CSS code by removing the unnecessary characters. You can use aVSCode
plugin calledminify css
or this website tool to reduce your code:https://www.toptal.com/developers/cssminifier
βοΈ I hope this helps you and happy coding!
Marked as helpful0 - @denieldenPosted about 2 years ago
Hi Samantha, congratulations on completing the challenge, great job! π
Some little tips for optimizing your code:
- add
margin: 0
to body to remove the scroolbars of browser - you can use
picture
tag to change image by resolution -> read here - centering a
div
withabsolute
positioning is now deprecated, it uses modern css likeflexbox or grid
- use
min-height: 100vh
to body instead ofheight
, otherwise the content is cut off when the browser height is less than the content - instead of using
px
use relative units of measurement likerem
-> read here
Hope this help! Happy coding π
Marked as helpful0 - add
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