Transparent Rollover Box

rhale1

KU Mac Geek
How do I pop up a little "rollover box" that is transparent using JavaScript or CSS?

I have seen this before, and the closest thing I can find to it is in Safari (see the pic).
 

Attachments

  • box.jpg
    box.jpg
    60 KB · Views: 19
Like if a user moves over a link, a little Box with a title and URL pops up, similar to the link-dragging popup in Safari.
 
You need JavaScript, and I don't even know if that's feasable in Java, although I suppose it is, even if painful to do.

You could also choose to simply have a different background behind the link when moused over, and then have a title to display if the user stays there.

To do this use the CSS background-color element and the title element to <a href=""> in HTML 4.
 
You could possibley use "invisible" divs. that show up when you hover over a link. It wouldn't be transparent but it could work. Sorry I'm trying to learn more about CSS myself so I can't be much more help :(
 
Originally posted by Da_iMac_Daddy
You could possibley use "invisible" divs. that show up when you hover over a link. It wouldn't be transparent but it could work. Sorry I'm trying to learn more about CSS myself so I can't be much more help :(

The div can be transparent indeed, but not semi-transparent. There's no transparency at the basis of CSS.

You could use a rollover of PNG files (which handle levels of transparency). The problem is, your link and your hovered link do not have the same size. That's dangerous for yur page. I can try to do it meeself too, but not before next Saturday, I'm taking exams :p
 
I think the image you posted (the rollover) is not to do with anything web, it's Safari's own dialog box/rollover (imo).

The only thing that I can think of to give you that sort of translucent effect is Flash I'm afraid.

check out my temporary site page at present (the drop-down menu coming off the pulsing button)... http://www.co-ord.com.

The menu has a transparancy (but this is a longer way to achieve what your after, and is only fixed in one position... though I'm sure you could use Flash for what you want.)
 
I think he wants to create this effect himself.

Dummy code:

<a href="link" on mouseover="display a new picture, PNG format, 8-bit transparency"><img src="normal link picture" /></a>

You need JavaScript and PNG-okay browser, as well as miniaml Photoshop skills to create correct transparent PNGs. That's not a so bad idea in the end, I'd like to do it but I'm not sure if it'll render nice. What worries me is that your normal picture and your hover picture will be of different size, and that's not recommended.

Otherwise it's true Flash would make a good job of it all. uoba rules, look at his site.
 
Back
Top