× Got a CSS, HTML or webdesign question? Ask it here!

Shrink wrapping images on our sites.

2 years 3 months ago - 2 years 3 months ago #14947 by TournamentWear
Shrink wrapping images on our sites. was created by TournamentWear
I understand imitation is a form of flattery, however, seeing our designs on overseas companies websites stinks. Is there any way you can put in the code from your end to shrink wrap all of our images? I believe all of us would be grateful. Or at least tell or show us how to do this from our end. Here is the code.

Laugh maniacally at frustrating one more image thief in the world!
Here is the <table> HTML Code I used to shrink wrap the above image. I’ll go through the code line by line and then give you the entire code below. If you are already an HTML master, feel free to skip the explanation and go straight to the complete code at the bottom of the page:

<table style=”display: inline;” border=”0″ cellspacing=”0″ cellpadding=”0″><tbody> <tr height=”199″>

The first line of the code sets the table border, cellspacing, and cellpadding to “0” so there is no space around the two images. Remember to set the <tr height> to the size of the picture you are trying to protect.

<td style=”background-image: url( the-image-that-you-are-trying-to-protect.jpg );” width=”300″>

This is the code for the image that you are trying to protect. We are telling it to be the bottom image in our image sandwich. Remember to change the <width> tag here to match the width of your actual image.

<img title=”Name-of-your-protected-image” src=”the-generic-file-name-of-your-clear-image.gif” alt=”” width=”300″ height=”180″ />

</td> </tr> </tbody> </table>

This final bit of code puts the second “clear” image on top of the previous image creating our completed image sandwich. Notice that the <height> tag here doesn’t match up exactly with the height of the original image. Sometimes this adjustment is necessary in order to avoid a “tiling” effect of the original image. Depending upon your image, you may want to start with the original height and then make it smaller as necessary.



Read more at: skinnyartist.com/how-to-shrink-wrap-your-images/
The following user(s) said Thank You: EvaK

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum