Old 29-05-2007, 19:48   #1 (permalink)
bluesage
Senior Member
 
Join Date: Dec 2006
Location: Switzerland
Posts: 350
text highlighting color change

Hi,

I have seen on a few sites (unfortunately dont remember which ones at the moment) that when I highlight text in the browser, for example to copy text, the highlighting color is something different from my default color.

any idea as to how this is achieved, I have tried to find an answer but without success.

I figure its most likely a javascript done trick, or possibly some CSS I have never seen before.

If I find the websites Im refering to, will post the links.

thanks
  Reply With Quote
Old 31-05-2007, 14:27   #2 (permalink)
Zaoris
Design is freedom
 
Zaoris's Avatar
 
Join Date: May 2007
Location: Romania, Europe
Posts: 100
Send a message via MSN to Zaoris Send a message via Yahoo to Zaoris
You mean a hover link?
  Reply With Quote
Old 31-05-2007, 23:14   #3 (permalink)
Snowshiro
Will work for Marmite
 
Snowshiro's Avatar
 
Join Date: May 2007
Location: Sapporo, Japan
Posts: 574
No, I think he means the ::selection pseudo-element. (It's part of CSS3)


Code:
::selection { // For Safari (and possibly others) background:#highlight-color; color:#text-color; } ::-moz-selection{ // For mozilla based browsers background:#highlight-color; color:#text-color; } For example: ::selection { // Gives white text on red background highlight background:#ff0000; color:#ffffff; }

AFAIK, as of the current time of writing, it's unsupported by Internet Explorer.
  Reply With Quote
Old 01-06-2007, 00:53   #4 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
Yeah. And you can expect it to be for some time.
  Reply With Quote
Old 06-06-2007, 15:10   #5 (permalink)
bluesage
Senior Member
 
Join Date: Dec 2006
Location: Switzerland
Posts: 350
thanks for the response, I guess thats what it is then . will have to experiment with those pseudo elements from CSS3.

btw, is CS3 officially finished or still under development ?


now that I know what it is, have found an example of it in use:

::selection

Last edited by bluesage : 06-06-2007 at 15:24.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8