re: Reasons not to use IDs in CSS VIEW POST

FULL DISCUSSION
 

Great post!

In the course I'm doing for full-stack development, in the CSS section it was advised to never use IDs ever, unless you absolutely need to. IDs are better used for JS it was suggested, and if anything it's lazy and inefficent code.

I wish I had known that when I learnt CSS a while ago and in my current codebase it's littered with IDs aha.

 

That's great that you can look critically at your old code and know how you'd improve it - you're definitely improving as a dev!

code of conduct - report abuse