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 the #1
? I never ran into problems with a numeric id
Update:
It seems I confused jQuery selectors and CSS selectors,
this would work fine with jQuery:
$(".phase#1")
but this:
.phase#1 {}
Will not work in CSS
id
's cannot start with numeric values 1, 2, 3, etc
. They can contain numeric values, just not start with them.
spec - http://www.w3.org/TR/html401/types.html#type-name
The id attribute specifies a unique id for an HTML element (the value must be unique within the HTML document). So if you selected by id you shouldn't also selected by class.
Specifies a unique id for the element. Naming rules:
HTML id Attribute specification
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With