Forum Moderators: not2easy

Message Too Old, No Replies

Invisible layer

         

yllai

8:44 am on Apr 19, 2004 (gmt 0)

10+ Year Member



I want to restrict user from highlight the content of my page by using css to add an invisible layer over the top of the page (suggested by other user of this page)? Anyone can show me?

Or you have other way to do it?

aeve

2:53 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



It's not that hard to do (absolutely position a div with a high z-index over 100% of the height and width of the body -- for ie add a transparent spacer.gif as background), but sounds like a really bad idea. In most browsers it will also restrict your users from clicking on links. Why don't you want the content to be highlighted?

Adam

yllai

12:39 am on Apr 20, 2004 (gmt 0)

10+ Year Member



I dont want user highlight and press ctrl+C to copy the content of the page.

I still not very clear of it, where can I get these example?

Purple Martin

1:32 am on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi yllai,

Do you remember me telling you that it's imposible to prevent people from copying an image? The same thing is true for everything on a web page. Once it's online, it can be copied, and there's nothing you can do to prevent it. If you don't want something copied, don't put it online.

Concentrate on maintaining the quality of your site so that it out-performs any competition.

Rambo Tribble

3:07 am on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Since this question seems to come up from time to time, I have produced a sample page demonstrating the technique. View the file source to see explanations in the comments.

Note that if you save the image by right clicking, what you will get is the transparent GIF, named transparent.gif. That means you will have one of your own, to play with.

<Sorry, no personal URLs. See TOS [webmasterworld.com]>

Just a repeat on the caveats: people can still get to your images, this technique just means it isn't a total no-brainer.

[edited by: tedster at 4:13 am (utc) on April 20, 2004]

D_Blackwell

4:02 am on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




yllai - Remember that you aren't stopping anyone with even a little knowledge. Following the path to your image is a very simple matter. I am regularly asked to "hide" images by clients. It's a very popular request. Truthfully, most of them have nothing to worry about. People tremendously overvalue the interest that their precious images will generate. The people that you do stop will only be the 'innocent' surfers that like your picture. Most likely, once they have it, it will sit on their hard drive to the end of time, before they actually get around to doing anything about it.

[edited by: tedster at 4:14 am (utc) on April 20, 2004]

Khemikal

2:08 am on Apr 23, 2004 (gmt 0)

10+ Year Member



Just FYI about the transparent gif over your image. If you still want the image beneath to be a link, just apply the link to your gif with the following style.

<a href=#"><img src="Images/Page/cover.gif" alt="Picture Name" style="border: none;"></img></a>

This allows users to still "click" on the image and go to a larger image or another page. Just make sure the gif is a square the same size as the image.

Khem