Disable user selection - HTML CSS CSS Property

HTML CSS examples for CSS Property:user-select

Description

Disable user selection

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.text-perfect-correction {<!--from   w w  w . j  a v  a 2 s .c o  m-->
   border-width: 6px;
   border-color: transparent;
   border-style: dotted;
   padding: 5px;
   margin: -11px;
}
.text-div {
   -webkit-line-break: after-white-space;
   display: inline;
   -webkit-touch-callout: none;
   -webkit-user-select: none;
   -khtml-user-select: none;
   -moz-user-select: none;
   -ms-user-select: none;
   -o-user-select: none;
   user-select: none;
   white-space: nowrap;
}


      </style> 
 </head> 
 <body> 
  <div class="text-perfect-correction" style="opacity: 1; font-family: Lato; left: 594px; top: 386px; font-size: 50px; color: rgb(0, 0, 0); width: 472px; height: 103px; position: absolute; display: block;"> 
   <div style="display:inherit;" class="text-div" spellcheck="false"> 
    <p> <span style="color:#696969"> <strong>Lorem ipsum text</strong> </span> </p> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials