Andy Green
asked on
Override default disables style.
I have an online form, that once filled out and saved can be opened, for viewing. The problem is I'm using .Enabled=false on the radio buttons/ dropdowns and textboxes. This renders the content too light to be read.
I've had a google, and found some solutions but nothing works, ie I can over ride the disabled style.
for example this is ignored, even though I can see the style is being applied its not working:
<style type="text/css">
input {color: black; -webkit-text-fill-color: black;}
</style>
Anyone have any ideas.
This is in chrome, but must work in Chrome & IE 10 up.
Andy
I've had a google, and found some solutions but nothing works, ie I can over ride the disabled style.
for example this is ignored, even though I can see the style is being applied its not working:
<style type="text/css">
input {color: black; -webkit-text-fill-color: black;}
</style>
Anyone have any ideas.
This is in chrome, but must work in Chrome & IE 10 up.
Andy
Unfortunately, you can't modify that particular behavior consistently. The alternative is basically to show the value as text and either hide or remove the element altogether. If you still need to be able to submit the value then also add a hidden field that has the same name and value as your now removed/hidden radio button.
ASKER
Thanks, what I'm trying to do now is remove the .enabled=false so the controls are again editable, but using a modal overlay, to stop users from accessing the controls.
I'm hoping I can set the transparency to make the values more visible.
Has anyone done this?
Andy
I'm hoping I can set the transparency to make the values more visible.
Has anyone done this?
Andy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To set the style for a disabled element, you usually use the disabled pseudo selector:
input:disabled { color: black; }
input:disabled { color: black; }