I've been looking for this throughout the web and can't even find anyone else even asking this, let alone a solution...
Is there a way to change the color of the highlight area within a text input when text is selected? Not the highlight border or the background, but the portion that appears around the text when you have the text actually selected.
If you are looking for this:
Here is the link:
http://css-tricks.com/overriding-the-default-text-selection-color-with-css/
It seems like when you define the border inside of a focus pseudo element style declaration it uses that instead of the normal blue border. Using that you can define a style that is exactly the same as the element border.
Here is a modified border style:
Thanks for the links, but it does seem as if the actual text highlighting just isn't exposed.
As far as the actual issue at hand, I ended up opting for a different approach by eliminating the need for a text input altogether and using innerHTML with some JavaScript. Not only does it get around the text highlighting, it actually looks much cleaner.
This granular of a tweak to an HTML form control is just another good argument for eliminating form controls altogether. Haha!
Try this code to use:
this is the code.
I guess this can help :
Quoted from Quirksmode