tags:

views:

45

answers:

1

Hi,

I have many forms which has many text input that are read-only. I am doing this since users are not allowed to edit this anymore but they are allowed to view it.

My problem is the rendering on different browser. FF is doing fine in rendering this but IE6/IE7/IE8 is not doing any good. It is graying out the field and does not display well.

Any idea how to better style them in CSS?

.disabled{
    background-color:#9DFBFB;
    color:#191970;
    font-weight:bold;
}

<html>
<head>
</head>
<body>
    Data: <input type="text" readonly="readonly" class="disabled" value="Test"/>
</body>
</html>
+3  A: 

Having a look at Styling form controls revisited it seems like IE6 is not able to style the disabled input, but IE7 and IE8 are. A workaround can be to add readOnly attribute instead of the disabled one. Haven't tried, though.

xPheRe
@xPheRe Sharp Look! Thanks.. I forgot that this is a read only field. I just set the class name to disable.
Mark Estrada