Link to home
Start Free TrialLog in
Avatar of darren-w-
darren-w-Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Opacity not working on ie8

Hi,

On this page,  the hyper links opacity change on rollover, though on ie8 the style does not have any effect, can anyone offer a solution?

Thanks

Darren

Avatar of Alex
Alex
Flag of Greece image

Maybe you have to give the css that you use first but for IE 8 the css needs that...

.your_class_here { -moz-opacity:.50; -ms-filter:”alpha(opacity=50)”; filter:alpha(opacity=50); opacity:.50; }

* Your link does not working.
Avatar of darren-w-

ASKER

sorry, gave you local link  http://94.193.107.131/mike/
The link is unreachable, but it does not matter I don't need to see anything.  IE8 does not support opacity except with an htc which will be block by many computers as a security threat, and many host will not permit them on the server for the same reason.

Cd&
Did you tried what I've suggested you?
Ok now your link is working :-)

Here is what you need...

#topnavigation ul a:hover {    
-moz-opacity:.70;
-ms-filter:”alpha(opacity=70)”;
filter:alpha(opacity=70);
opacity:.70;
}
Don't work, think its because its text and not images?
Ok, try this and let me know if it works, otherwise I'll suggest you something else.

#topnavigation ul a:hover {    
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
 -moz-opacity:0.5;
-khtml-opacity: 0.5;
 opacity: 0.5;
}

one of those might work in compatibility mode, but then you may run into problems that relate to IE 7 incompatibilities.  IE7 supported opacity but not much else.

Cd&
Change it, but cant see any difference?  Read this but does not seem to make any difference though...
Let's try something else.

You could try setting up a class (e.g. “myhovereffect”) for the links you want to have this transparency rollover effect on and then play with your CSS:

.myhovereffect:hover {
filter:alpha(opacity=70);
-moz-opacity:0.7;
-khtml-opacity: 0.7;
opacity: 0.7;
}

or

.myhovereffect:hover
 {    
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=70);
-moz-opacity:0.7;
-khtml-opacity: 0.7;
 opacity: 0.7;
}

or

.myhovereffect:hover
 {    
-moz-opacity:.70;
-ms-filter:”alpha(opacity=70)”;
filter:alpha(opacity=70);
opacity:.70;
}
changing the selector will take care of IE8:

 
#topnavigation ul li a:hover { 
filter: alpha(opacity=50);
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

 -moz-opacity:0.5;
-khtml-opacity: 0.5;
 opacity: 0.5;
}

Open in new window

no change
Hmm... It seems like simply setting the filter/opacity value in IE isn’t enough.
IE requires an element to be positioned in order  to work the filter/opacity option.

2 solutions:

1) If your element doesn’t have a position you can work around this by adding ‘zoom: 1‘ to your CSS.


2) Create divs instead of ul & li and give them positions.

PS. For all the above cases you must keep these:

-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=70);
-moz-opacity:0.7;
 opacity: 0.7;

or

-moz-opacity:.70;
-ms-filter:”alpha(opacity=70)”;
filter:alpha(opacity=70);
opacity:.70;
It's the li you need:

#topnavigation ul li a:hover

did you add the li to the selector?
ASKER CERTIFIED SOLUTION
Avatar of Kyle Hamilton
Kyle Hamilton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This works, seems just putting the styling for the link  as a block fixes it.
oh, yeah, and that :)

cheers.