2
   

Need Graphics to be Dim Until Mouseover

 
 
B-truE
 
Reply Wed 17 Dec, 2003 11:26 am
I'm trying to find a way to dim some small banners that I am putting on a site. I want to be able to keep them dim (faded; lower opacity) on the web page until a mouseover - upon mouseover I want them to be fully visible.

I don't want to create another copy of the image that is dimmer and simply roll the image over on mouseover. And I cannot mess with the code (for the banners).

Any ideas? Examples?

Thanks.

B-truE
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 3,264 • Replies: 5
No top replies

 
Craven de Kere
 
  1  
Reply Wed 17 Dec, 2003 03:03 pm
I'm, not sure what code change limitations you have but you can accomplish this without a rollover image by using CSS.

The CSS would be something like this:

Code:.fade{filter:alpha(opacity=50); -moz-opacity:0.5;}
.normal{filter:alpha(opacity=100); -moz-opacity:1;}


Then you define the image class like this:

Code:class="fade" onmouseover="this.className='normal'" onmouseout="this.className='fade'"
0 Replies
 
B-truE
 
  1  
Reply Wed 17 Dec, 2003 11:57 pm
Thanks Craven.

You and your site are so helpful. There aren't many boards where solid answers come forth.

B-truE
0 Replies
 
Craven de Kere
 
  1  
Reply Thu 18 Dec, 2003 12:15 am
Thanks, it's fun to help. Especially when it helps (sometimes it doesn't). ;-)
0 Replies
 
Monger
 
  1  
Reply Thu 18 Dec, 2003 10:19 am
b-true, here's a pretty simple script to get images to fade in gradually on mouseover -- 'tis a nice effect. . .

Gradual-Highlight Image Script (IE4+, NS6+)
0 Replies
 
Craven de Kere
 
  1  
Reply Thu 18 Dec, 2003 11:07 am
Just remember that the additional javascript in that example works on fewer browsers (though the simply rollover effect should degrade gracefully).
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » Need Graphics to be Dim Until Mouseover
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/25/2024 at 10:46:45