CSS target label based on for attribute? [duplicate]
Possible Duplicate:
CSS selectors - how to select ‘for’ in CSS?
I have the following html. Can I target the label based on its for attribute (so only target this label)?
<label for="something">Text</label>
Solution 1:
You can target the attribute by :
label[for="something"] {
/* woohoo! */
}
For stands for the attribute name
and ="value" stands for its value.