PDA

View Full Version : Pop-It Menu and Background Opacity...



e-roq
08-02-2005, 06:40 AM
Hello Friends,

I am working with the Pop-It scripts and all is working well.
http://www.dynamicdrive.com/dynamicindex1/popit.htm

I would like to add an opacity to a background if possible and I was wondering if anybody could share any techniques to accomplish this. On approximately line 30 of the script, it goes as follows:
document.write('<div id="popitmenu" etc...

This is the div but if I place opacity on this then the text will take on the opacity effect as well which I do not want to have happen. Is there anyway I can add opacity just to the background and keep the text normal...?

Thanks for any help. :)

[Edit]
I added
opacity: 0.75;
filter: alpha(opacity=75);
-moz-opacity: 0.75;
to the popitmenu css but it made everything(text) take on the opacity effect as well.

jscheuer1
08-02-2005, 06:38 PM
Once an element has a given opacity, the entire element and all its children have that opacity, period. One work around is to make your text black and bold, if it is a light background, white and bold if a dark background. That way it often looks as though the text is just a lighter or darker color, while the background allows some of what is beneath to show through.