Disabled input text color
Posted
by Incidently
on Stack Overflow
See other posts from Stack Overflow
or by Incidently
Published on 2008-11-04T15:26:50Z
Indexed on
2010/06/01
16:13 UTC
Read the original article
Hit count: 169
Hi
The simple HTML below displays differently in Firefox and WebKit-based browsers (I checked in Safari, Chrome and iPhone).
In Firefox both border and text have the same color (#880000), but in Safari the text gets a bit lighter (as if it had some transparency applied to it).
Can I somehow fix this (remove this transparency in Safari)?
UPDATE:
Thank you for your answers. I don't need this for my work anymore (instead of disabling, I'm replacing input elements with styled div elements), but I'm still curious why this happens and if there is any way to control this behaviour ...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
input:disabled{
border:solid 1px #880000;
background-color:#ffffff;
color:#880000;
}
</style>
</head>
<body>
<form action="">
<input type="text" value="disabled input box" disabled="disabled"/>
</form>
</body>
</html>
© Stack Overflow or respective owner