Hi I have an ASP.NET application with a drop down list. How to disable a drop down list with CSS, so it appears grayed out? Is it possible to do this with only CSS ?
+2
A:
Sorry, I interpretted your question before to refer to a drop-down menu. I now believe you are referring to a combo box.
You can use the CSS disabled
attribute to accomplish exactly what you want.
e.g.:
#disabled-class
{
disabled: true;
}
David Pfeffer
2010-02-22 14:48:32
A:
David is right. Another option (still non-CSS) is too loop through all the options and disable each one. They will turn the gray color you want and be disabled. Using a library like jQuery makes this a snap.
Gregg
2010-02-22 14:55:47