HTML & CSS
something like this?
I used this two styles for switching on MouseOver
border: 1px solid #CCCCCC;
filter: Alpha(Opacity=10, Style=0);
cursor : hand;
border: 1px solid #000;
filter: Alpha(Opacity=100, Style=0);
And some P7extension to make the switch possible..(see source.
This works fine, but is not exactly what you mean..
Maybe you could try to SNAP another DIV on top of the image-box with a semi-transparent bg-image, with your desired color and name it "style_off" and then onMouseOver switch the style on this extra DIV to "style_on" where you put a complete transparent image as background.
thats all i know (for now)
I want to do the exact same thing on my site so I can keep with the color tinted theme, instead I'm having to just black and white the images.
Wisbin I believe the alpha opacity you have used on your site is exactly what crayz has done, he now needs (like me) to be able to tint the images with a specified colour.
If anyone does know a way to do this I too would appreciate it.
Yes, what Wisbin posted is what I have been able to do in the past. Now, exactly as you said JohnShaft, I need to 'tint' images with a specified color, instead of grey them out.
OK, I know what you mean, I posted this anyway, because I think it could be helpfull to others.
About the tinting stuff, I'm not sure what effect you are trying to achieve, I dont get the part: "grey them out, with colours". Do you mean something like this?
>> example tinted overlays
.. or do you want to change the opacity of the image PLUS a coloroverlay like the above sample?
- this is as far as I can get.. (for now)
Wisbin, you are getting closer. On the link you provided before, what I would like is to use CSS to make my pictures have that red overlay like the top SitePoint image, but when you mouseover them, to take the red overlay off and see the normal SitePoint image. I didn't want to make two different images to do this. I just want to use CSS to do it for me.
Thanks for the help wisbin.
That is sort of what I want to acheive.
Unfortunately on that link you provided they are doing it with an overlayed image by having a grid consisting of the colour and transparent blocks.
To me that looks horrible.
I want to overlay it with a colour that is semi transparent (if it needs to be done the overlay way). Think of the way you can tint using a colour of certain transparency for a div, so you can see half of the background beneath.
I guess maybe that's the only current workaround atm.
But the blocky looking effect on that linked page looks far to pixely for me to use.
absolutely true, I would not use it either like this, to blocky.
But look at this: http://www.ict-id.nl/temp/sitepoint/html/coloroverlay.html
I think I come very close now.
This is exactly what I am looking for Wisbin. Thank you for all your help, and don't take down that page for a while!
Share the implementation on your project(s), please.
Haven't tested this, but could you set the background color of the image to the color you want for the "overlay" and then decrease the image's opacity letting the background color come up through the image? If this sounds really stupid, I apologize. I've never really played around with the filter property, but this solution just jumped out as a logical conclusion while reading the thread.
nope, doesnt work. Would be nice solution though. But helas, the imagebox doesnt show the background color on the bottom layer, it stays white (default background-color of img I guess)
still like to know if this opacity-filter works on older browsers and mac platform.. anybody?
(works on PC: IE6+, Mozilla 1+, NS6+, Opera 7)
Thanks for this Wisbin, this is exactly what I wanted to do in tinting the thumbnailes of movie images on my site.
It was more complicated than I imagined, all I had been using in the past had been basic filters. But the great thing is it works in Netscape, I actually thought filters didn't work at all in Netscape.
I haven't managed to figure out how I can implement it yet (all it's doing is the opacity with no tint) but that's because I can't figure out the Layer stuff involved. My CSS knowledge is functional at best.
Thanks, and I'll be sure to post back here when I have it fully up and running.
This topic is now closed. New replies are no longer allowed.