Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>  
like image 330
Evanss Avatar asked Dec 18 '12 14:12

Evanss


1 Answers

You can target the attribute by :

label[for="something"] {    /* woohoo! */ } 

For stands for the attribute name
and ="value" stands for its value.

like image 96
Ladineko Avatar answered Sep 19 '22 11:09

Ladineko