Quote:
Originally Posted by Baez You can't do that in HTML. |
Ah, but you can. Using CSS you can overlay your images with a transparent background. So, if they try to right click your image and save as, all they get is the transparent background instead.
Code:
<html>
<head>
<style type="text/css">
.transparent {
background:url('transparent.gif');
position:absolute;
top:0px;
left:0px;
width:310px;
height:310px;
z-index:2;
}
.logo {
background:url('image.jpg');
position:absolute;
top:0px;
left:0px;
width:310px;
height:310px;
z-index:1;
}
</style>
</head>
<body>
<div class="transparent"></div>
<div class="logo"></div>
</body>
</html>
Please don't disable right clicking with Javascript, that is extremely annoying. Just come to the realization that you cannot prevent people from stealing your images on a webpage.
EDIT: Oh, and to restrict access to certain parts of your website you'll either need to make a login system with a server-side language (like PHP, ASP, Perl, etc), or you'll need to use Apache's htaccess functions.