hi there! 👋
you shouldn't apply width
and height
directly to your elements, their child elements should determine these dimensions. If you really want to determine their width use max-width
along with the width
property using relative units.
You should avoid hard-coded values (pixels) most of the time. When you use these values you give up responsiveness(or you make it harder for yourself at least)..
Typically you will increase the font-size property with @media
queries. If you have hard-coded values all over your CSS, you need to modify every element's font-size
. On the other hand, if you use rem
-s all you need to do is changing the font-size
in your CSS :root
selector and all your elements will have a new size based on that value.
I usually use em
for padding and margin
for text-based elements, since their margin usually based on their font-size
, and again, when you change the font-size in :root
these values will scale up as well without you touching them, making your job easier and your page maintainable..
Hope this was helpful 🙏
Good luck and happy coding! 💪
Marked as helpful
@kubabebe
Posted
@kodan96
Thank you for your comprehensive answer. I will try to do the challenge again, following your advice.
Best Regards :)