santa
santa

Reputation: 12512

IE issue with :hover

I am trying to figure out why my CSS does nopt work in IE (v.9).

I have the following CSS:

#cq div:hover {
   background-color: #fff;
   cursor: pointer
}

and HTML

<div id="cq">
    <div>item</div>
    <div>item</div>
</div>

It works fine in all other browsers.

Upvotes: 0

Views: 103

Answers (2)

robC
robC

Reputation: 2737

The problem may be that your page is running in Quirks mode. Try changing your doctype to:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

More on browser modes: http://hsivonen.iki.fi/doctype/

Upvotes: 1

Selvamani
Selvamani

Reputation: 7684

Its working fine. try to change background color

#cq div:hover {
background-color: red;
 cursor: pointer;
}

<div id="cq">
<div>item</div>
<div>item</div>
 </div>

here the Demo

Upvotes: 0

Related Questions