473,389 Members | 1,067 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,389 software developers and data experts.

How to disable text selection? (css?)

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
20 47057
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
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
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
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
"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
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
"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
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
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: kj | last post by:
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...
16
by: Jeremy Clulow | last post by:
One disadvantage of designing with CSS and without tables appears to be that selecting specific block of text from a web page to copy and paste, or in order for it to be read by a text-to-speech...
1
by: JSM | last post by:
Hi, Would there any reason why I can't select text in an axWebBrowser control? I use the Write method of the IHTMLDocument2 object to populate the control with built on-the-fly html which looks...
2
by: Alpha | last post by:
How I can disable multi-selection on a datagrid? User now can select multi-rows on the grid by holding down control key. I don't see such property for the grid as for the list control. Is there...
1
by: Bidarkota | last post by:
Can i disable the text selection in a datagrid cell. ( i should not be able to select the text to copy in the datagrid). how to achieve this. Please help with a sample code. Thanks in advance
2
by: mask | last post by:
example: function disableText() { return false; } document.addEventListener("mousedown", disableText, false); i search many examples that use document.onmousedown = sidableText, so, how...
2
by: sourabhmca | last post by:
Hi Friend. I have used a frame inside the html page where in I am displaying the content of other html page.. I want to disable text selection of the content inside the frame.. Can you please show...
1
by: rbuczynski | last post by:
I've read two threads that have been closed in which a user posed the question, "Can I disable text selection using CSS?" The responses were either hopeless or critical of the inquirer. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.