Gary Winhoven Gary Winhoven - 1 year ago 49
CSS Question

Why is hover function only working on some computers?

I have a simple hover function that makes the image more transparent. I'm trying to use the site on IE 11. The weird thing is that on some computers, it works how it's supposed to. On others also running IE 11, it doesn't. I don't know if this is a code problem or maybe just a settings issue. Any ideas?

Here is my image code:

<img alt="Home" class="auto-style8" src="http://contoso/AzureTeam/Images/Home.png">

Here is my css:

.auto-style8 {

width: 150px;
height: 150px;
.auto-style8:hover {
opacity: 0.4

There's nothing too fancy too it. I don't really understand what is wrong.

Answer Source

Try using css Cross-Browser prefix

like this for example:

  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

  /* IE 5-7 */
  filter: alpha(opacity=50);

  /* Netscape */
  -moz-opacity: 0.5;

  /* Safari 1.x */
  -khtml-opacity: 0.5;

  /* Good browsers */
  opacity: 0.5;