Is this allowed in CSS? Can you have more than one instance of the same class on a page?
Yes, that’s the purpose of a css class. You are not supposed to have multiple elements with the same id though, as an id is supposed to be a unique identifier.
Ok cool. That’s what I thought and that’s the way I’ve always done it, but I do know that I’ve had issues with using multiple divs with the same id before. It works, but is not W3 compliant. I was asked this question in a phone interview the other day and answered it correctly, but I’ve never been asked that so I wanted to make sure. Thanks actionAction!
No problem, :thumb2: Hope you get the job!
here’s to guessing during interviews (hopefully I will be doing some of that soon).