tags:

views:

125

answers:

2

I have a simple page with some html. When I hold and drag the mouse to highlight a part of it, for example a paragraph, it changes the forecolor of the text to blue, it does not change the forecolor to white and change the backcolor to blue as it normally does. Does anyone know anything that would cause this, for example, a certain CSS setting or something else?

Could this happen if the text, in this case the paragraph tags are on an image (the background is set to an image)?

Is there a way to change what the highlight color of the text when you highlight it?

A: 

That is exactly the behavior of selecting an image.

CSS cannot directly influence this; it's a function of the browser.

EDIT: You've added that the background is set to an image, but this would not influence the highlighting at all. Do you have a sample URL?

David Kolar
So is my comment about the image correct? If there were not image and it was just a plain background with white color, it would do the normal highlighting?
Xaisoft
In the absence of any other information, I would say yes. It sounds like an image is being selected, and not actual text.
David Kolar
Sorry, no sample url, but is there a way to change what color the text is when you highlight it, such as in the css.
Xaisoft
There's nothing you can do to influence how an image looks when it's highlighted in the browser. IE will highlight *text* differently if it's light-on-dark vs. dark-on-light; other browsers will always make the text white on a blue background.
David Kolar
A: 
  1. What browser?
  2. Are you able to post the HTML in question?
Paul Ruane
IE and firefox. The html is not much, its just 1 sentence, but I believe it is happening because the body's css background is set to an image?
Xaisoft