Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7886499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:20:00+00:00 2026-06-03T05:20:00+00:00

First, I have been here How to make HTML Text unselectable But that doesn’t

  • 0

First, I have been here How to make HTML Text unselectable
But that doesn’t solve my issue, (the JavaScript version works well, but I need to make it using HTML and CSS, I cannot use JavaScript) I used the recommended CSS, but look at my DEMO drag the mouse from [drag from here] to [to here] you will see that the text is still selectable.
any way to make it really unselectable?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:20:01+00:00Added an answer on June 3, 2026 at 5:20 am

    After reviewing this problem, Came to mind another method to prevent the user from selecting text while viewing the page, basically, setting up a mask over the target text:

    Your Fiddle updated here!

    Example:


    CSS

    .wrapTxt {
      position: relative;
    }
    .wrapTxt .mask {
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
    

    HTML

    <p class="wrapTxt">
      This is my text! My text is mine and no one Else's!
      <span class="mask"></span>
    </p>
    

    The principle here is simple (Fiddle), have a block element over the text, occupying all of it’s wrapper space.

    The downfall is a hard implementation if you need one line to be selectable and the next one not. Also, links on the “not selectable” text will not me available.

    Final note:

    The user can always go around this, either by looking at the source code, or by dragging the mouse from top to bottom of the webpage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using pil for the first time today. And I wanted to
I have been working on building my first CSS site using divs and am
I have been programming in Java (my first language) for about six months and
I have been developing my first TCP/Socket based application with Apache Mina, it looks
I have been using this code with great success to pull out the first
I have been coding application from past 1 year, However first time I came
I have been using SimpleRepository for months now, and for the first time i
I have been experimenting some problems with the fully distributed version. First of all
First a bit of background. I have been working on the MS platform for
I have this site I've been working on here: http://www.replyonline.co.uk/DirectionGroup/xmas/index.php When you hover over

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.