cannonarm
asked on
Textbox highlight color html
Does anyone know how to change the highlight color in a textbox on a webpage ? Standard highlight colors are dark blue background and white text. I would like to be able to modify these if possible.
I know of no way to do this with CSS. Highlight colors are controlled by the operating system and maybe the browser. You might try changing the color of the font to see if the highlight color changes, or change the background of the text box, but that is not the same thing.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry rdivilbiss, that code does change colors of the text box and text , but I could not control the highlight colors with that code. I have to give credit to Zyloch, I do not think it can be done with CSS.
Works in IE, FF, & Opera...
Here is a live example with screen shots.
Here is a live example with screen shots.
@rdivilbiss,
Changing the background color of the field is similar to, but not exactly the same as changing the highlight color, unless I'm mistaken.
Changing the background color of the field is similar to, but not exactly the same as changing the highlight color, unless I'm mistaken.
What the fore, and back colors are directly affect the highlight (selected) color in almost all browsers. I'm just setting them temporarily (while selected) to get the desired effect. It isn't always easy to determine what highlight colors you'll get from a given set of fore and back colors. It may or may not be feasible for the asker's intent, and it is very limited. Just not impossible.
I see I forgot the link above: http://www.rodsdot.com/temp_testing/highlight-text-on-select.htm
I see I forgot the link above: http://www.rodsdot.com/temp_testing/highlight-text-on-select.htm
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would never do this on a production web site.
I hate colored scroll bars and inputs.
I hate colored scroll bars and inputs.
no opinion