Forum Moderators: open

Message Too Old, No Replies

noselect option for text?

         

krups

1:47 pm on Sep 23, 2005 (gmt 0)

10+ Year Member



basically i have some text that overlays an image. can i make it so the user can't select it with the mouse? the effect i want is that the text appears to be part of the image, but isn't.

Hester

3:49 pm on Sep 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That goes against accessibility. Having said that, just bung a layer over it with a transparent gif in.

krups

4:24 pm on Sep 23, 2005 (gmt 0)

10+ Year Member



thank you sir!

Robin_reala

6:56 pm on Sep 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In the future you'll be able to do:

::selection { background-color: transparent; color: inherit; }

in your CSS. That's the CSS3 selection pseudo element which allows you to style what the user's selected text looks like; in this case with a transparent background and the same color as the foreground text. Safari and MSN for MacOS X support this apparently, and I know Mozilla has a testing version which is still a little buggy. As far as I know they're the only rendering engines to have this feature currently.