[thelist] ReadOnly TextBox BackColor ??
fstorr
fffrancis at fstorr.demon.co.uk
Fri Aug 12 22:00:22 CDT 2005
On 13 Aug, 2005, at 00:45, Casey wrote:
> In ASP.NET, when a textbox is set to readonly="true", it gives the
> box an
> ugly grey background. Is it possible to change this color?
>
The only way that you can currently do it is to apply a class as
others have sugggested. If you're not fussed on browser support and
don't want to apply a class, this CSS2.1 attribute selector works in
gecko-based browsers, opera 8.1 (not sure about previous versions of
opera) and safari 2 (again, not sure about previous versions of that):
<style type="text/css">
input[disabled]{
background-color:red;
}
</style>
Regards
F
More information about the thelist
mailing list