Transparency in other browsers

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
odt
Beginner
Beginner
Posts: 4
Joined: Fri Jul 29, 2005 12:27 pm
Location: Scotland
Contact:

Transparency in other browsers

Post by odt »

Is it possible to get the menu system to set transparency for other browsers?

The following website has a neat implementation of transparency in a browser independent form:

http://nocturne.net.nz/webdev/imgfade.php

Owain
Owain
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You might want to take a look at this topic. It talks about moz opacity and such. You can actually set the 'opacity' using the onclass and offclass menu properties to apply it.

So create a class in the head of the document in style tags or put it in a style sheet, you can use the following but leave out the filter:alpha, it's just there to show all the opacity codes for different browsers. That one is applied through the overfilter/outfilter options.

Code: Select all

.opaque { 
   opacity: .5; 
   filter: alpha(opacity=50); 
   -moz-opacity: .5; 
} 
the first is I believe for Safari, the second is ie and the last is of course mozilla. opacity and -moz-opacity code from 0-1 in fractions, so you could have - .1, .2, .3 etc. So, .5 is equal to 50%.

Once the class is created you need to apply it. So, in the menu you'd choose whichever menus to which you want this applied and put this in their style onclass="opaque";offclass="opaque";

Now, if you only had it set up for the offclass, then when you moused over the item it should be 'normal', no opacity, but that would only happen in Safari and Mozilla unless you left in the alpha for IE. Of course it would also work the other way, if you left out the offclass and only had it 'called' when you moused over the menu.

Since onclass and offclass can be applied to an item, you could use that in a specific aI string instead of applying the class to the particular menu.

As to that image fade script. I'm sure it could be used however, I am not a function person so I wouldn't know how to apply it to specific images in the menu. Unless you applied it to the menu as a whole, and again, I don't know how to do that.

NOTE: in that topic I linked, there is a link for a 'fader' type menu, beta setup, that no longer works with the newer versions of the menu. Too many changes have occurred and that is no longer in development as far as I know, there's too much under development as to functionality so Andy doesn't really have time right now.

Hope that helps.

Ruth
Post Reply