7 Most common CSS mistakes that you should avoid

7 Most common CSS mistakes that you should avoid ❌👇

➡️ Ignoring CSS reset properties

Try to display html page without css, by doing this you'll observe that the web browser itself styles the page by using some default values, so to avoid these default styles we need to reset the margin and padding using a universal selector. 
➡️ Avoid using color names

Try to use hex code instead of color names because the hex code ensures specificity, and it provides full control to the user to decide exactly what color user wants to display. 

➡️ Not using CSS shorthand property

Css shorthand property helps user to reduce the size of css file and make the code more readable.

➡️ Avoid code repetition
Avoiding repetition of the same code helps user to save time and reduce page-load speed.

➡️ Avoid using px, rather use rem, em 

px values ensures that the user should see the same sized elements everywhere, whereas rem, em ensures that the website scales proportionally according to the user's choice of screen or browser size. 

➡️ Not using fallbacks fonts 

It may be the possibility that the type of Fonts you are using is not supported by the browsers and makes your page looks untidy so to avoid this fallback come in use. It ensures that it would fallback to the second most preferred option. 

➡️ Avoid designing for desktop before mobile 


Post a Comment

Post a Comment (0)

Previous Post Next Post