Click to See Complete Forum and Search --> : Pretty dumb question...


nichie
03-24-2003, 04:36 PM
There is something I want to do, but I'm not entirely sure how.

Here is the page I'm modifying: http://wasteland.nichie.net/index.html

As you can see, there are several images being used as links. I want to make it so that when you mouseover the image links, the whole image becomes a solid color. Is there a way to do this without creating a mouseover image for every single image? If not, is there a way to specify the height/width of a mouseover swap image so I can just make a 1x1 pixel image of that solid color and stretch it to fit every image link?

I hope that made sense.

nichie
03-24-2003, 04:59 PM
No, see those images that say "news, purpose, members," etc? I mean those ones. There's also a link inside of the big image (the words "lauren herosian.")

AdamBrill
03-24-2003, 05:07 PM
I think this will work for you... Put this in the head:<script language=javascript>
function rollMe(element){
if(!element.off){
element.off=element.src;
}
if(element.src==element.off){
element.off=element.src;
element.src="";
element.style.backgroundColor="black";
} else {
element.src=element.off;
element.style.backgroundColor="transparent";
}
}
</script>Then in each of the images, add these:onmouseover="rollMe(this)" onmouseout="rollMe(this)"Make sure you put it in the image not in the link...

nichie
03-24-2003, 05:10 PM
Yep! That's what I wanted. Thanks, AdamBrill. :)