Wordpress Themes - vBulletin - Internet Advertising - Debt Consolidation - Debt Consolidation

PDA

View Full Version : Change text opacity separately with backGround


So1
Mar 25th 2008, 8:36 am
I tryed scriptaculous Effects - background changing... jQuery - the same effect. Tryed to make this myself... the same result. Maybe somebody already had been do it?

beforehand, sorry for my English :D

Morishani
Mar 25th 2008, 11:46 am
Well, just create a child element with the text, like this :


<div class="background">
<div class="text_effect">
text here
</div>
</div>


and then apply the effect on the child element (div class="text_effect")

So1
Mar 25th 2008, 12:00 pm
at first i've thought that it'll work but

css:
.backgr {background:#FFAAEE;}

HTML & JS:
<div class="backgr">
<div id="1" onClick="this.style.filter='alpha(opacity=50)';" class="text_effect"> <img src="http://forums.digitalpoint.com/images/buttons/newthread.gif" onClick="this.style.filter='alpha(opacity=50)';"> text here </div>
</div>

when you click at image opacity of image changes, but if you click inside the "div" - opacity don't changes. not for image, not for text. The same if tou click at the button.
Strangely enough, this code dont work =(
Maybe i doing something wrong? =(

Morishani
Mar 25th 2008, 12:13 pm
that's wierd, try to give the div some width, maybe it will help.

So1
Mar 26th 2008, 8:46 am
HA! If i type code as above, it's not work. If i use <table><tr><td></td></table> inside the DIV and changing opacity of table like this: <table onClick="this.style.filter='alpha(opacity=50)';"><tr><td>some content</td></tr></table> it works :D and div color not changes. HURAAAAY!

Once again, sorry for my poor english :D