Thursday 23 February 2012

CSS: How to select id/class that contain an attribute equal to foo1

Assume we have the following labels:
<label for="foo1"></label>
<label for="foo2"></label>
Then the following CSS selector will make bold the 1st one (with for="foo1"):

label[for="foo1"] {
  font-weight:bold;
}

No comments:

Post a Comment