@correlucas
Posted
๐พHello @omarsaleh11, Congratulations on completing this challenge!
Great code and great solution! Iโve few suggestions for you that you can consider adding to your code:
1.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
2.Donโt use id
to give the style of your elements, it's not a good idea because id
is a too specific selector used for forms
and Javascript code. Instead, use class
for styling and let the id
for much specific stuff. It's also not advisable to use IDs as CSS selectors because if another element in the page uses the same/similar style, you would have to write the same CSS again. Even if you don't have more than one element with that style right now, it might come later.
โ๏ธ I hope this helps you and happy coding!
Marked as helpful
@omarsaleh11
Posted
@correlucas thanks as always for the feedback, and of course what you wrote is entirely right and I agree with it,
but I think I never used px in font sizes in my last challenges ( may I be wrong, I don't know) bcoz I use the function of sass to change px to rem.
and I just used id in CSS for once ( remove-events ) I think and I gave it id instead of class bcoz I thought I would never do this name for any other element or tag on the challenge and also to use it in js without making a class.
the main problem in this challenge I think is ( I wrote a lot of CSS media queries ) to make it available in every resolution with different styling