unselectable text css code

  • Author
    Posts
  • #1816735

    xronoserimos
    Member

    at Support – Writing & Editing – Code it says that If you wrote some code or pasted it in from another web site and then it disappeared after publishing the post, the code is likely being stripped out. If you feel it’s being stripped out improperly or if you would like to suggest additional types of code we should allow, please contact support.

    so i would like to suggest to allow a css code that makes the text of a blog unselectable. This is very important for blogers that use their blog to publish their personal ideas thoughts and job.

    Please let us know if this is possible.

    The blog I need help with is xronoserimos.wordpress.com.

    #1816840

    thatrobyn
    Member

    Hi there. You can use the following code. It will protect the text in the body of your posts. It is not a cure-all…but it does target all the main internet browsers and it keeps the users of those browsers from selecting your text.

    Click Appearance → Customize in your site’s Dashboard. Then, click CSS in your right-hand menu. In the CSS Revisions box, please paste the following underneath all existing text:

    .entry-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;

    /*Please note that the following you will have to test yourself on browsers other than Chrome, Safari, Firefox, IE */

    -o-user-select: none;
    user-select: none;

    }

    Then Save your changes.

    If you want fail-safe security, you may choose to move to a self-hosted site, as WordPress.com doesn’t allow third-party copyright plugins. If you haven’t looked into self-hosting before, here’s a helpful link:

    http://en.support.wordpress.com/com-vs-org/

    Let me know how that works out for you. Thanks very much.

    #1816851

    xronoserimos
    Member

    dear thatrobyn,

    thank you for your reply. i did the above and it worked until i left the css editor page. i did save the code and the text became read only, but after i left the page the code disappeared and the text became selectable again.

    #1816852

    xronoserimos
    Member

    dear thatrobyn,

    thank you for your reply. i did the above and it worked until i left the css editor page. i did save the code and the text became read only, but after i left the page the code disappeared and the text became selectable again.

    #1816853

    thatrobyn
    Member

    Hello there! I’m not sure why it didn’t save when you attempt the change. I just tried it for you, and saved the CSS. Could you try to select some of the content, and see if it works? This will only protect the text within the content of your posts and pages, not other text on the site. Thank you!

The topic ‘unselectable text css code’ is closed to new replies.