By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,631 Members | 1,362 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,631 IT Pros & Developers. It's quick & easy.

How to disable text selection? (css?)

P: n/a
kj


Is there any way to disable text selection in a web page (or at
least render it invisible to the user)?

If there is a way to control how selected text and its background
are rendered, then the desired effect could be achieved by setting
these parameters to match those of regular text. In this way, even
if text was selected, the user would not see that it was.

(I thought that this is something that may be controlled through
css, but I have not been able to find anything in my css book, or
in my google searches. Maybe I'm not using the right search
keywords.)

Thanks!

kj
Jul 20 '05 #1
Share this Question
Share on Google+
20 Replies


P: n/a
kj wrote:
Is there any way to disable text selection in a web page (or at
least render it invisible to the user)?
No. Leastways not with CSS or HTML, not in a reliable fashion, and not
without really annoying many of your visitors.
If there is a way to control how selected text and its background
are rendered


No

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2

P: n/a
kj wrote:
Is there any way to disable text selection in a web page (or at
least render it invisible to the user)?


Yet another variant on the same old theme of "How do I force the user's
browser to do something really annoying, or to disable some of its
features?" I deal with that sort of thing in my site:

http://webtips.dan.info/force.html

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Jul 20 '05 #3

P: n/a
On Fri, 13 Feb 2004 16:23:08 +0000 (UTC), kj <no****@please.com> wrote:


Is there any way to disable text selection in a web page (or at
least render it invisible to the user)?


Post all your text as images.

Don't uplload the page to the server.

What do you want? Your content is so valuable it shouldn't be copied and
pasted, sell a book.
Jul 20 '05 #4

P: n/a
Neal wrote:
On Fri, 13 Feb 2004 16:23:08 +0000 (UTC), kj <no****@please.com>
wrote:

Is there any way to disable text selection in a web page (or at
least render it invisible to the user)?


Post all your text as images.

[snip]

I wonder if there is any OCR software that can turn a screen-capture directly
into ASCII text?

It would appear to be a pretty simple extension to existing OCR capability. It
would be just one more demonstration of how futile is this pursuit of
uncopyable pages.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #5

P: n/a
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
I wonder if there is any OCR software that can turn a screen-capture directly
into ASCII text?

It would appear to be a pretty simple extension to existing OCR capability.


No extension required, OCR software uses images as input.

--
Spartanicus
Jul 20 '05 #6

P: n/a
Spartanicus wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
I wonder if there is any OCR software that can turn a screen-capture
directly into ASCII text?

It would appear to be a pretty simple extension to existing OCR
capability.


No extension required, OCR software uses images as input.


I know! I meant use the screen-capture directly, rather than turning it into
an image file first.

Can I do shift + PrtScr then immediately have OCR software show the text in a
window? (I'm just being lazy. I have Photoshop and turn screen captures into
new image files a lot).

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/


Jul 20 '05 #7

P: n/a
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
I wonder if there is any OCR software that can turn a screen-capture
directly into ASCII text?

It would appear to be a pretty simple extension to existing OCR
capability.


No extension required, OCR software uses images as input.


I know! I meant use the screen-capture directly, rather than turning it into
an image file first.


Screen captures are placed on the clipboard, thus it can be pasted into
an OCR application without having to save it as a file first.

--
Spartanicus
Jul 20 '05 #8

P: n/a
Neal wrote:
On Fri, 13 Feb 2004, kj <no****@please.com> wrote:
Is there any way to disable text selection in a web page (or at
least render it invisible to the user)?


What do you want? Your content is so valuable it shouldn't be
copied and pasted, sell a book.


....and destroy all photocopy machines.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #9

P: n/a
kj wrote:
Is there any way to disable text selection in a web page
Not really. A better question is why you *want* to disable it.
(or at least render it invisible to the user)?


Not yet, but Mozilla is working (has worked?) on a ::selection pseudo
class.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #10

P: n/a
In message <Zx************@newsfep3-gui.server.ntli.net>, Barry Pearson
<ne**@childsupportanalysis.co.uk> writes
Spartanicus wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
I wonder if there is any OCR software that can turn a screen-capture
directly into ASCII text?

It would appear to be a pretty simple extension to existing OCR
capability.


No extension required, OCR software uses images as input.


I know! I meant use the screen-capture directly, rather than turning it into
an image file first.

Can I do shift + PrtScr then immediately have OCR software show the text in a
window? (I'm just being lazy. I have Photoshop and turn screen captures into
new image files a lot).

Not the definitive test, but:

I thought I'd try using Print Screen Delux to create a file, and
Omnipage to do the OCR, with some cropping in Photoshop first in order
to get rid of the browser framing (I couldn't see any way to insert the
image into Omnipage from the clipboard).

The answer seems to be yes ............ and no.

Success depends on the size of the text and, hence, the number of pixels
making up each character.

I got quite 'reasonable' results on a page that used Tahoma font at
100%. Anything much smaller than that just produced too much rubbish.
regards.

--
Jake
Jul 20 '05 #11

P: n/a
Spartanicus wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
I wonder if there is any OCR software that can turn a screen-capture
directly into ASCII text?
[snip]I know! I meant use the screen-capture directly, rather than turning
it into an image file first.


Screen captures are placed on the clipboard, thus it can be pasted
into an OCR application without having to save it as a file first.


Thanks, that makes sense.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #12

P: n/a
On Sat, 14 Feb 2004 11:02:20 +0000, Spartanicus <me@privacy.net> wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
I wonder if there is any OCR software that can turn a screen-capture directly
into ASCII text?

It would appear to be a pretty simple extension to existing OCR capability.


No extension required, OCR software uses images as input.


But they typically want a higher resolution than the screen provides.

I have seen software that does OCR from screen text, though: Babylon, a
little translation utility.

Cheers,
Philip
--
Philip Newton <no***********@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.
Jul 20 '05 #13

P: n/a
kj


It's amusing to see a misdirected usenet overreaction in full
bloom... :)

Relax. It is obvious from what I wrote that I couldn't care *too
much* if users cut and paste content from my page (after all, I
*did* say that it would be OK with me just to modify the way selected
text is *rendered*, in which case all those "countersolutions"
involving scanners and OCRs are kind of ridiculous).

I just don't want certain clickable text (headers in a table, if
you must know) to change appearance if the user accidentally drags
the mouse over it as they click on it. I could turn these headers
into buttons, but I don't like the way buttons look (i.e. raised).
If there is a way to have a perfecly flat button, with text that
looked pretty much the same as the header in a regular HTML table,
that would be perfectly fine too.

kj
Jul 20 '05 #14

P: n/a
kj wrote:
It's amusing to see a misdirected usenet overreaction in full
bloom... :)


Since you didn't quote any of the message that you're replying to, I
have no idea what you're talking about.
--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #15

P: n/a
In <f_MXb.186993$U%5.921536@attbi_s03> Brian <us*****@julietremblay.com.invalid-remove-this-part> writes:
kj wrote:
It's amusing to see a misdirected usenet overreaction in full
bloom... :)
Since you didn't quote any of the message that you're replying to, I
have no idea what you're talking about.


Awwwwwww...... Go to mommy--she'll help you.
kj, if all you want is a flat button try this:

<html><head><title>button test</title>
<style type="text/css">
input.flat_button {
border-style: none;
background-color: transparent
}
</style>
</head>
<body>
<form action=""><p>
<input type="button" class="flat_button" value="can't select me">
</p></form>
</body></html>

For more info, check this out:

http://www.w3.org/TR/CSS2/box.html#b...yle-properties

bill

P.S. Don't let the "church ladies" get to ya!

Jul 20 '05 #16

P: n/a
bill wrote:

Awwwwwww...... Go to mommy--she'll help you.


Where'd that button go? Oh, there it is. *plonk*

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #17

P: n/a
In <l8QXb.188858$U%5.941017@attbi_s03> Brian <us*****@julietremblay.com.invalid-remove-this-part> writes:
bill wrote:

Awwwwwww...... Go to mommy--she'll help you.
Where'd that button go? Oh, there it is. *plonk*


that hurt

Jul 20 '05 #18

P: n/a
kj wrote:
I just don't want certain clickable text (headers in a table, if
you must know) to change appearance if the user accidentally drags
the mouse over it as they click on it.


It's hardly the responsibility of the site author to "protect" the user
against the consequences (aesthetic or otherwise) of accidentally (or on
purpose) using standard browser features and having them cause the
standard result.

--
== Dan ==
Dan's Mail Format Site: http://mailformat.dan.info/
Dan's Web Tips: http://webtips.dan.info/
Dan's Domain Site: http://domains.dan.info/
Jul 20 '05 #19

P: n/a
On Sun, 15 Feb 2004 18:32:28 +0000 (UTC), bill <bi**********@yahoo.com>
wrote:
kj wrote:
It's amusing to see a misdirected usenet overreaction in full
bloom... :)

People responded to what you asked. You can hardly blame usenauts for
not knowing that you meant to ask something else.

kj, if all you want is a flat button try this:

<html><head><title>button test</title>
<style type="text/css">
input.flat_button {
border-style: none;
background-color: transparent
}
</style>
</head>
<body>
<form action=""><p>
<input type="button" class="flat_button" value="can't select me">
</p></form>
</body></html>
In IE that results in text which has no indication at all that it is
clickable, and so the button is pointless. Welcome to Mystery Meat.

If you're wanting to suppress the hover effect, a better approach is
something like:
input.my_button { background-color: #BBBBBB; }
input.my_button:hover { background-color: #BBBBBB; }

But it's a bad idea to use buttons for navigation anyway (if that was
the original idea) because they are unusable for people without
Javascript.
P.S. Don't let the "church ladies" get to ya!


Meaning what? Ignore people who are trying to achieve usable, accessible
web-pages?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #20

P: n/a
Stephen Poley <sb******************@xs4all.nl> wrote in
news:d9********************************@4ax.com:
But it's a bad idea to use buttons for navigation anyway (if that was
the original idea) because they are unusable for people without
Javascript.


Of course, you can make an ordinary link *look* like a button, and *act*
like one from the user's point of view, with the right CSS.

Jul 20 '05 #21

This discussion thread is closed

Replies have been disabled for this discussion.