Reputation:
I have a group of label-input sets of which some sets have a disabled input, and others have a normal input. You can see a basic example in this fiddle.
I want the labels of the normal inputs, to have a pointer
cursor, whilst the other labels (of the disabled inputs) should have a default
cursor. Is there a pure CSS way to do this? I'd need a selector for "a label which is for a disabled input" or "a label which is for a not-disabled input".
I need this to be flexible, so hardcoding the ids isn't possible (and wouldn't be neat).
Upvotes: 2
Views: 1162
Reputation: 304
Try this:
input:disabled ~ label{
cursor:default;
}
The label and input will need a wrapper.
Upvotes: 2