Re: Styling by attribute-based association?

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 UTC