Common CSS Mistakes every Developer should avoid

Lined Circle
Lined Circle

1. Using px Px locks your design to a fixed size for all screens. You should always try to use relative measurements such as em, rem, %, etc and wherever possible

Lined Circle
Lined Circle

2. Using one CSS file for styling Using single file in big projects can create mess. Try to use different CSS files for different components. This will also increase the reusability of code.

Lined Circle
Lined Circle

3. Using inline CSS You have to write the same code again & again for different elements, there is no place to put these styles for reuse. Always try to use external stylesheets until needed.

Lined Circle
Lined Circle

4. Using !important everywhere The only thing that can override an !important is another !important, and once you go down that road, it never stops. There's no point in jamming your CSS with a lot of !important styles and become gridlocked.

Lined Circle
Lined Circle

5. Not using proper naming convention Make sure to name classes, ids and other attributes properly and in a similar manner. Try storing color values in variables instead of copying same color over and over again.

Lined Circle
Lined Circle

6. Not designing beforehand It feels amazing to just start building without thinking much, but this can turn in a mistake once things get complex. Try to have a clear picture of project.

Lined Circle
Lined Circle

7. Being too creative You don't need heavy CSS or animations forced into your website. Elegant design with good UX/UI is preferred by everyone.

Lined Circle
Lined Circle