When is it best to use id's versus classes in css?
Lol, this is supposed to be for makeup questions, but I guess I don't mind web design questions too. The major difference between ID's and Classes is that ID's are unique, whereas classes can be used as many times as you like. You can also have multiple classes assigned to one element on the page. So, the main reason why you would choose to use an ID over a class is if you want a certain element to be unique from the rest of their similar elements. For instance, you can use the same class on a group of divs to define their width, height, etc in css. But if you also want each of those divs to have a different color background, you would apply a unique ID to each of those divs. Hope this helps!
myCosmeticBag
Wants Questions About
- makeup

