views:

169

answers:

4

Is there any equivalent for -moz-user-select / -webkit-user-select for IE6 ?

I would like the text on my page not to be selectable in all major browsers.

What is the best solution for that ?

A: 

I would use an image for the text

RC
+2  A: 

check here unselectable text in ie

kc rajput
A: 

Use jQuery.

(only half-joking)

Entendu
A: 

Here's the example

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unselectable text</title>
</head>

<body style="height: 100%; padding: 0; margin: 0;">

<style>
  .column {width: 30em; margin: 1em;}
  p {position: relative; z-index: 1; //height: 100%;} /* you can remove //height if declare doctype */ 
  .unselector {display: block; position: absolute; z-index: 2; width: 100%; height: 100%; top: 0; left: 0;}
  .unselector img {display: block; position: absolute; z-index: 3; width: 100%; height: 100%;}
</style>

  <div class="column">
    <p>
    <span class="unselector"><img src="1.gif" alt="" border="0" /></span>
    Activists on&nbsp;ships raided by&nbsp;Israeli commandos cast doubt on&nbsp;Israel's version of&nbsp;events that led&nbsp;to at&nbsp;least nine deaths. Yes, the webpage is currently not available. 
    </p>
  </div>

</body>
</html>

p.s. 1.gif is transparent 1px*1px image

utype