Re: [whatwg] required attribute in label

2010-08-21 Thread Eduard Pascual
On Sat, Aug 21, 2010 at 6:18 PM, Brenton Strine wrote: >> > > and > >>   > > are effective, but then again this would be too: > > ...* > > It just seems a shame that we have this neat attribute that indicates > required controls, but we can't actually use it to change the > presentation adding ad

Re: [whatwg] required attribute in label

2010-08-21 Thread Brenton Strine
> and >   are effective, but then again this would be too: ...* It just seems a shame that we have this neat attribute that indicates required controls, but we can't actually use it to change the presentation adding additional code. Brenton

Re: [whatwg] required attribute in label

2010-08-21 Thread Tab Atkins Jr.
On Fri, Aug 20, 2010 at 11:33 PM, WhatWg wrote: > However, it seems that since input is an empty element, the content cannot > be added after. Right; s don't have children. (In some actual implementations, they just automatically hide their children from the rest of the DOM.) ~TJ

Re: [whatwg] required attribute in label

2010-08-21 Thread Diego Perini
This could be another way to solve the same problem: label + input[required] + span:after { content: " * "; } Name   However, the above does not work on IE6 (attribute selectors). So the id/class suggested by Chris is actually the most cross-browser solution. Diego On Sat, Aug 21, 2010 at 3

Re: [whatwg] required attribute in label

2010-08-21 Thread Chris Cressman
> Why not make "required" an acceptable attribute for the label element? The class or title attribute can solve your problem: label.required:after {content:"*"} label[title~="required"]:after {content:"*"}