Jump to content


Photo

Changing the highligh (text-select) color


  • Please log in to reply
6 replies to this topic

#1 Petemac

Petemac
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 02 January 2006 - 02:35 PM

I have a question that widely goes unanswered.

How do I change the color of highlighted text? You know when you select a bunch of text, and the web browser gives the selected text a blue background and changes the text white? How can I change those colors to whatever I want?

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 January 2006 - 03:34 PM

I strongly suspect that this is a function of the operating system (the so-called 'theme') and nothing that can be changed by CSS for the browser.
Legend has it that reading the manual never killed anyone.
My site

#3 Petemac

Petemac
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 07 January 2006 - 12:34 PM

Yes, this is what I have heard.
But I have seen it done...


#4 play_

play_
  • Staff Alumni
  • Advanced Member
  • 717 posts

Posted 10 January 2006 - 07:07 PM

[!--quoteo(post=334304:date=Jan 7 2006, 07:34 AM:name=Petemac)--][div class=\'quotetop\']QUOTE(Petemac @ Jan 7 2006, 07:34 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Yes, this is what I have heard.
But I have seen it done...
[/quote]


I think it is javascript.
This site uses it:
[a href=\"http://www.mad4milk.com\" target=\"_blank\"]www.mad4milk.com[/a]

Highlight some text with your mouse, and the hi-lite color is pink
regex.kat.sh --- regex library
u.kat.sh ---- url shortener
tabbit.org ---- tabbed pastebin

#5 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 14 January 2006 - 12:05 AM

if you look into the style sheet of mad4milk.com:

::-moz-selection{
    background: #fbdbe8;
    color: #F55B99;
}

::selection {
    background: #fbdbe8;
    color: #F55B99;
}

it doesn't work on IE
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#6 BrandonKahre

BrandonKahre
  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 January 2006 - 05:53 PM

VERY cool find! Even if it is a only Mozilla feature.

#7 Petemac

Petemac
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 31 March 2006 - 08:29 PM

Thanks! this is exactly what I was looking for!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users