1

I have found a website where the text is select protected.

How can i make this without JavaScript. I think it is possible by using CSS.

A set of paragraph is protected with non selectable contents.

But i don't know how to do.

asked Aug 6, 2013 at 5:59
2
  • 1
    Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask Commented Aug 6, 2013 at 6:16
  • 1
    @gnat hereafter i will correct myself and will give detailed description. Thank you Commented Aug 6, 2013 at 7:02

1 Answer 1

2

Give Style as

.unselectable {
 -moz-user-select: none;
 -webkit-user-select: none;
 -ms-user-select: none;
}

In HTML give as

<p class="unselectable">
Your Answer
Thanks for contributing an answer to Programmers Stack Exchange!
Please be sure to answer the question. Provide details and share your research!</p>

Now it 'll work.

answered Aug 6, 2013 at 6:15

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.