W3C home > Mailing lists > Public > www-style@w3.org > October 2005

Re: Styling by attribute-based association?

From: Allan Sandfeld Jensen <kde@carewolf.com>
Date: Wed, 26 Oct 2005 01:00:55 +0200
To: www-style@w3.org
Message-Id: <200510260100.55414.kde@carewolf.com>

On Tuesday 25 October 2005 21:06, Matthew Raymond wrote:
>    How does one style an element based on whether it has an association
> to another element via an attribute? Specifically, how do I style a
> <label> with a |for| attribute?
>    Situations where this would be useful:
> 1) You want the label to have a dashed border when the associated
> control is selected.
Is there any particular reason you can not define associated labels to be 
siblings or in another well known position to their control?

"input:focus + label"

Received on Tuesday, 25 October 2005 23:02:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:41 GMT