[Javascript] No right click-Web dialog!

Triche Osborne wdlists at triche-osborne.com
Fri Sep 16 08:24:32 CDT 2005


Troy III Ajnej wrote:
> 
> But again I'm afraid it would take me a lot of nerves to position them rightly 
> and se if none of the text paragraphs flees under, over,left, right,top of the 
> wrong image, position text objects absolutely also, etc? Because both the 
> img-div and the img-transparent would have to be absolutely positioned in case 
> you want them overlaped and give them some fancy position on the document flow.
> 
I guess I wasn't very clear. You just do one inside the other, and use 
JS (or PHP, if you're using a db to manage the site) to write out this:

<div class="holder" style="width: img width; height: img height;">
     <img class="photo" style="width: img width; height: img height;" />
</div>

An entry in the style sheet closes any gaps around the image:

.class, .photo {
    border: 0;
    padding: 0;
    }

.photo {
    margin: 0;
    }

What you do with the DIV as far as positioning depends on how it's used 
in the page.
	Remember, I said I only use this method for art and photography 
clients. Most of their work is displayed gallery-style, usually with 
small thumbnails that are clicked to produce an enlargment in a popup or 
a single target. Since the thumbnails are so small--usually less that 
150px wide, and more often 50x50px--the only image that receives this 
treatment is the enlargement.
	On regular sites, I discourage clients from trying to protect images, 
and once I demonstrate how quickly I can capture an image on a site 
that's supposedly protecting them, they usually get the point. ;-)
	With the photographers, it's different. They know you can't completely 
protect them. Their goal is simply to make it difficult enough that it 
discourages casual theft, like someone who might swipe their photo of 
cousin Jane's wedding instead of paying for one.

Triche




More information about the Javascript mailing list