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

Re: Styling by attribute-based association?

From: Jasper Bryant-Greene <jasper@album.co.nz>
Date: Wed, 26 Oct 2005 12:27:05 +1300
To: Allan Sandfeld Jensen <kde@carewolf.com>
Cc: www-style@w3.org
Message-Id: <1130282825.10617.6.camel@jasper.local>

On Wed, 2005-10-26 at 01:00 +0200, Allan Sandfeld Jensen wrote:
> 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"

Because they're not always siblings or in a well-known position.

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: jasper@album.co.nz
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand
Received on Tuesday, 25 October 2005 23:27:09 GMT

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