Can I use DIV Class and ID together in CSS? For example:
--
Yes you can.
You just need to understand what they are for, the class
is more general and can be used several times, the id
(is like your id's) you can use it only once.
This excellent tutorial helped me with that:
The Difference Between ID and Class
Though it's not an exact answer to your question I'm sure it will help you a lot!
Good luck!
EDIT: Reading your question, I just want to clarify that:
<div class="x" id="y">
--
</div>
And that if you want to "use them" in CSS for styling purposes you should do as David Says: #x.y { }
That's HTML, but yes, you can bang pretty much any selectors you like together.
#x.y { }
(And the HTML is fine too)
Yes, why not? Then CSS that applies to class "x" AND CSS that applies to ID "y" applies to the div.