Notification texts go here Contact Us Buy Now!

How to disable copying text using pure CSS

Mahmudul Hasan
thumbnail

Hello everyone, Welcome here, nowadays several new bloggers copy from other's websites to decrease their hard work to post content. By copying content we get several issues that even can stop our website. You might want to disable copying text on your website, then this tutorial is for you. In this tutorial, I am going to show you How to disable copying text using pure CSS. So without wasting much time let's check how to do it.

How to disable copying text using pure CSS in Blogger?

Before following these steps we recommend you take a backup of your Blogger template, By chance if any mistakes have been done we can undo changes using that backup.

  • First of all, go to your Blogger dashboard
  • Then click on the Theme option from the sidebar
  • Then click on the drop-down icon near Customize option
  • Then choose Edit HTML from the drop-down menu
  • Then find 
  • Then Find ]]></b:skin> and paste the following CSS just above it or you can paste the following CSS just above </head> by creating <style></style> tags.
/* Disable Copy */ body{user-select:none;-moz-user-select:none;-ms-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}/* Enable copy on pre and code tags */ pre, code {user-select:text;-moz-user-select:text;-ms-user-select:text;-khtml-user-select:text;-webkit-user-select:text;-webkit-touch-callout:text}
  • Now click on the save icon to save HTML.
  • How to disable copying text using pure CSS?

    • First of all, open your website index.html file
    • Then find </head> and paste the following CSS just above it
    <style>/* Disable Copy */ body{user-select:none;-moz-user-select:none;-ms-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}/* Enable copy on pre and code tags */ pre, code {user-select:text;-moz-user-select:text;-ms-user-select:text;-khtml-user-select:text;-webkit-user-select:text;-webkit-touch-callout:text}</style>
  • Then save the index.html file
  • Conclusion

    Hope this tutorial will help you to disable copying text on your website, If you have any doubts related to this tutorial ask me in the comments,  Do share with your friends, Thanks for visiting, Have a nice day!




    إرسال تعليق

    Cookie Consent
    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
    Oops!
    It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
    AdBlock Detected!
    We have detected that you are using adblocking plugin in your browser.
    The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
    Site is Blocked
    Sorry! This site is not available in your country.