OsakaWebbie
Programmer
I have a few text fields (<input type=text>) that I want to change the appearance of based on the situation. When they are in use, I want them to look like they normally would: white with thin, dark gray borders (so that they match the numerous other fields on the page that I am not doing this to). When they are disabled, depending on the situation I either want only the background color changed to match the color behind it (which is not the default light gray of a disabled form field), or the whole thing to disappear without its size changing (the best way I see to do that is to change the border color to the same as the background; if I change the border style to none, the fields and the table cell they are in both shrink by a couple pixels, which looks strange). But the strange thing is that once I change either color from the default (whether inline CSS or dynamically in Javascript), the borders become a sortof beveled concave frame, rather than simple lines, and they stay that way even after I set the color(s) back to what they were. Do I have to literally set all the borders' style and width, even though currently I don't use those properties at all? The appearance of the borders is slightly different in IE and Firefox, but the basic problem happens in both.
And a related question: when I have changed a field to one of the inactive modes and want to change it back, how do I know my border color will match the default shade of gray chosen by the browser for the untouched fields? Or do I really need to literally set the attributes for all the fields on the page just so they'll match?
And a related question: when I have changed a field to one of the inactive modes and want to change it back, how do I know my border color will match the default shade of gray chosen by the browser for the untouched fields? Or do I really need to literally set the attributes for all the fields on the page just so they'll match?