Choosing div by id and class
I am trying to select this using both is and class:
<div class="phase" id="1">
and nothing works, I tried:
.phase#1 #1.phase div#1.phase
could it be #1
? I have never encountered problems with numeric id
Update:
I seem to have confused jQuery selectors and CSS selectors,
this will work fine with jQuery:
$(".phase#1")
but this:
.phase#1 {}
Not working in CSS
The id attribute indicates a unique identifier for the HTML element (the value must be unique in the HTML document). Therefore, if you selected by id, you should also not select by class.
Indicates the unique identifier of the item. Naming Rules:
- You need to start with the letter AZ or az
- It will be followed by: letters (A-Za-z), numbers (0-9), hyphens ("-") and underscores ("_")
- In HTML, all values โโare case insensitive