![]() |
CSS gurus inside please....watermarking with css
im trying to watermark some thumbs
Code:
a img{ thanks |
make your image the background, put the watermark over it as a thumb
|
Quote:
|
Yea what grump said! :)
|
<div style="background: url(yourimage.png) top left no-repeat;"><img src="watermark.png" /></div>
|
Or, if your server is linux, you could use 'composite' to make a watermarked version. I'd go with this approach because if you just use CSS people can download the original image anyway.
Code:
composite -gravity southeast -dissolve 15 watermark.jpg original.jpg watermarked/original.jpg Code:
for file in `ls images/*.jpg`; do composite -gravity southeast -dissolve 15 watermark.jpg $file watermarked/$file; done |
shit that would be impossible :( no way around it?
|
Quote:
|
Or if your site is in PHP you could do something like this:
Code:
$base_dir = getcwd(); // meh |
Ahhhh. If that's the case then the background-image being the actual thumb is best. Why can't you do that?
|
It's called using the z-index and it only works when elements have a set position type.
Also, it's pointless and you should be using PHP or another language/software to create images with real water marks. |
Quote:
|
Quote:
Might be able to come up with something if we can see the layout of the HTML. Though, I definitely think you should edit the script you're using and do it by setting your image to the background image, and using the thumb image in <img src=''> :thumbsup |
position: relative;
z-index: 0; then for the overtop position: relative; z-index: 1; then just use margin to adjust it over top of the thumb. i suggest putting both inside a div. |
unless you are trying to do a hover effect, then best way it just to watermark it automatically.
here is an example of a play button on hover. http://cssglobe.com/post/1238/style-your-image-links |
Quote:
|
Z-Index is the solution to what you are asking but it's not a good idea to watermark using CSS as people can still easily steal your photos.
Imagemagick is a tool you can use to watermark images on-the-fly either during upload or delivery. |
z-index didn't seem to work cuz i cant edit actual html. the java posted above works, i need to invert it somehow.
|
no z-index does work you just have no idea to explain your problem. we dont speak jew here.
|
Quote:
|
the problem with using the thumbnail as a background image is that it is unclickable no?
i don't see the problem using CSS to add a watermark -look at all the TGP's that use CSS to add a little 'NEW' graphic on top of their thumbnails. |
Quote:
like i said i can not edit html itself only the css here is the html code Code:
|
Quote:
|
not being able to edit the html sucks :/ why cant you edit it btw?
|
Quote:
Quote:
|
thanks everyone for the help, i figured it out with the javascript fris posted :)
|
Quote:
|
Quote:
|
Quote:
|
All times are GMT -7. The time now is 11:01 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123