omega
omega

Reputation: 43883

How to assign css hover to tag when there is another tag on top?

I have a table and I want to assign a css hover to all its cells. But at the same time I have a div tag with a bg image and it has the same width and height as the table and its being positioned right on top of the table with position relative. How can I still assign the css hover to the cells of the table, because when I try it, it doesn't work, and I think it's because when I it's detecting the div tag...

Does anyone know the solution to this?

NOTE: it has to work with IE9 (can't use css3 either)

Upvotes: 0

Views: 129

Answers (2)

pardis kermanshahi
pardis kermanshahi

Reputation: 1

There are 2 solutions:
1-Use the following code:

<td  onmouseover="className='tdon'" onmouseout="className='tdoff'"></td>

then write tdon and tdoff classes in css.

2- Use jQuery $("td").hover(function() {});

Upvotes: 0

fin
fin

Reputation: 1299

check this post

It can be done using CSS pointer-events in Firefox >= 3.6 and Safari >= 4.0. Probably some Chrome version too. Unfortunately, I don't have knowledge of a cross-browser workaround.

#overlay {
  pointer-events: none;
}

Upvotes: 4

Related Questions