Click to See Complete Forum and Search --> : Highlighting


fla5hba5h
07-18-2003, 12:40 AM
Okay I've got a few questions about highlighting on websites.


I've seen pages where, when you highlight something, the text doesn't get a background, but it changes color. Does anyone know how they do that?

I've also seen pages where you can't highlight or copy anything. Here is an example since I can't exactly explain it: http://www.jadersworld.com/vector/

Jick
07-18-2003, 12:55 AM
I looked a the source of that page real quick and this looks like what your looking for:

<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false">

Exchange your normal <body> tag with the code above and it should do what you need. Hope that helps. ;)

fla5hba5h
07-18-2003, 01:04 AM
Yeah. But I don't wanna stop people from viewing the source on my site. It's a good way to learn. I was just wondering how to do it....


Anyways, how about the other question?

Jick
07-18-2003, 01:47 AM
Well I'm not sure about that. I have seen it before though. I think that it has to do with your theme. Some times if you set your theme for your OS to have white select then you go to a page with a white background it just appears to be making the text a different color since it distorts the color for you to be able to see it and since you have your theme set to white and the page background is white it just looks like there is no select around it but there really is. Hope that answers the other question for you. :D

fla5hba5h
07-18-2003, 01:57 AM
No, my OS theme was set to black highlight.

Jick
07-18-2003, 02:00 AM
Do you possibly have a link to an example page where you saw this effect? I think I could better understand and help you if I saw some actual code. :)

fla5hba5h
07-18-2003, 02:19 AM
Sorry, I forgot where. It was a long time ago. I'll see if I can find an example.

brendandonhue
07-18-2003, 07:09 AM
You might try searching for the OnSelect event in javascript.

fla5hba5h
08-01-2003, 11:18 PM
Okay, got it.

http://halo.bungie.org


Highlight any of the links. I downloaded their *.css file and they set the background of the links to white. I guess that's it.

fla5hba5h
08-05-2003, 01:18 AM
Anyone?