Skip to content

Instantly share code, notes, and snippets.

@tutweb
Created February 18, 2013 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tutweb/4980559 to your computer and use it in GitHub Desktop.
Save tutweb/4980559 to your computer and use it in GitHub Desktop.
Disable Text Selection With CSS
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Disable Text Selection With CSS</title>
<style>
.website-content{
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
}
</style>
</head>
<body>
<div class="website-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo praesentium expedita suscipit beatae placeat obcaecati labore hic in reiciendis ipsum laborum assumenda quos omnis ab voluptatibus aliquam ex vitae nulla molestias ratione.</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment