Reputation: 2301
I am trying design a css for a dynamically generated Label. I am trying to write css for For attribute of label which can have the anything+Textbox
. My prefix can be anything and suffix remain same. and I tried this
label[for=*+"TextBox"]
{
color:#DD4B39;
font-size:smaller;
}
How to write css for above situation? Any help are surely appretiated.
Upvotes: 1
Views: 3255
Reputation: 132
Try doing something like this:
label[for$="TextBox"]
{
...
}
More info at link
Upvotes: 2
Reputation: 6411
This will select every <label>
element whose for attribute value contains "TextBox"
label[for*="TextBox"]{
color:#DD4B39;
font-size:smaller;
}
This will select every <label>
element whose for attribute value ends with "TextBox"
label[for$="TextBox"]{
color:#DD4B39;
font-size:smaller;
}
Upvotes: 3