ID selector via attribute?

Is there a reason why there couldn't be a way to select elmemets by
IDs, based on an attribute of another element?

For instance, something like (this syntax isn't too good though):

  <label for="me">text</label> <input .. id="me">

  label:focus #attr(for) { color: red; }

...would make the input red when label is focussed. Would be quite
handy imo.

If not that, then how about a specific selector just for form labels?

-- 
Tom Gilder
http://tom.me.uk/

Received on Monday, 21 April 2003 07:26:04 UTC