Can I use DIV Class and ID together in CSS? For example:
--
Of course you can.
Your HTML there is just fine. To style the elements with css you can use the following approaches:
#y {
...
}
.x {
...
}
#y.x {
...
}
Also you can add as many classes as you wish to your element
And you can style that element using a selector with any combination of the classes and id. For example:
#id.classA.classB.classC {
...
}
#id.classC {
}