Welcome to WebmasterWorld Guest from 54.227.83.19

Forum Moderators: not2easy

Message Too Old, No Replies

CSS: place text over image links

transparent rollover

     

Doood

11:30 pm on Jul 6, 2007 (gmt 0)

10+ Year Member



I want to use a semi-transparent image to appear on top of image links.

Example would be when you hover over a product then the text "Click here to purchase" would appear on top of the image and the original image would still be visible.

I suppose just one image containing the text would be used, so like an image that's 100x100 wouldn't be replace but another image that's 100x100 would show up on top of it with the text.

Is this possible with css?

Other methods would require lots of coding and this would be just one image, a css style, and a span tag or something.

Marshall

12:05 am on Jul 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An easy method using CSS would be to swap images on hover:

a:link {
background-image: url(link.gif);
}
a:hover {
background-image: url(hover.gif);
}

Marshall

Doood

12:37 am on Jul 7, 2007 (gmt 0)

10+ Year Member



Yeah but then I'd need a seperate css style for every image I wanted the hover effect on. Plus I'd also have to create a seperate hover image for every one also.

Marshall

1:48 am on Jul 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you really need an image or will a title tag do? I do have a combination javascript and css that uses a <div> in relation to the mouse pointer.

Marshall

Doood

4:36 am on Jul 7, 2007 (gmt 0)

10+ Year Member



Text may work just as well. I think I've found something that will probably do the job,
cssplay dot co dot uk slash opacity slash image_linktext
 

Featured Threads

Hot Threads This Week

Hot Threads This Month