Jump to content

Class and id in a single element?


Recommended Posts

It is not automatically bad practice, and good developers do it frequently. That said, it's possible to make a mess out of anything. From a strictly CSS point of view, this technique is useful if multiple elements need the same style (create a class) and a single member of that class needs to modify 1-2 aspects of that style (use the ID).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...