I have two divs on my site that I am using as up and down scroll areas. They both have an onmouseover event attached to them which will scroll an image. These are divs that have a height and width, but no text or background to them. They also have a :hover state set.

This works perfectly in any browser but IE. In IE the divs seem to not even be there, mouseing over them does nothing, the :hover does not work nor the event. BUT, if I give the divs a background color, they are recognized and function how expected.

What would be causing such behavior? I do not want a background color or text in these divs.

Site: http://www.karencaldwelldesign.com/fashion

5 answers

1
point
This was chosen as the best answer

Try declaring the color transparent, just a guess:

div
{
background-color:transparent;
}

I don't know why it is behaving in that way. Probably just another IE glitch.

Answered about 7 years ago by tahdhaze09
  • I ended up doing this before I saw your reply, worked like I wanted it to. Another IE oddity solved. Nic Hubbard about 7 years ago
1
point

I have had this issue only with table cells. In that case adding a   worked for me.

Answered about 7 years ago by Divya Manian
danwellman 5600
0
points

You could try adding a comment to the empty divs. Probably won't help but I never leave an element completely empty as a standard rule, if it has no content it gets an html comment :)

Answered about 7 years ago by danwellman
  • That didn't help... Nic Hubbard about 7 years ago
danwellman 5600
0
points

Have you tried putting the two hover divs after the content1001 div in the content div?

Answered about 7 years ago by danwellman
0
points

Hmm. I think I read something on the subject this morning.

I would try setting the background to transparent, as tahdaze09 suggested, and if that doesn't work, try using a transparent background image.

Ah, yes. Here is the article I read.

Answered about 7 years ago by Joshua Clanton
  • Setting the background-color to transparent will not fix the issue, I tried this using the IE developer toolbar. The article you link to mentions the problems IE has with z-index - this is why I suggested moving the two hover div's so that they appear after the image's container which should help IE understand where in the stack to put them. I think this will fix it, but this isn't something you can do with the developer tools ;) danwellman about 7 years ago