Arthas
Arthas

Reputation: 11

Hover background image doesn't work IE11

I'm trying to fix a issue with IE 11 about my hover thing.

Basically, when I mouse over the link, the text background changes.

Everything works fine with FireFox and Google Chrome. However, the background image doesn't appear with Internet Explorer 11.

ul .news:hover {
  background: url("Images/OverNews.png");
}
<ul>
   <li class="news"><a href="#"> News </a></li>
   <li class="chat"><a href="#"> Chat </a></li>
   <li class="forum"><a href="#"> Forum </a></li>
   <li class="contact"><a href="#"> Contact </a></li>
</ul>

Upvotes: 0

Views: 651

Answers (2)

apload
apload

Reputation: 11

I had a similar problem. My solution was to set the HTML element to a block element. But in my case the background image was on the anchor tag. Try

.news {display:block;}

Upvotes: 1

dJ-j79
dJ-j79

Reputation: 1

try:

ul .news:hover {
  background-image: url("Images/OverNews.png");
}

Upvotes: 0

Related Questions