I have a simple (absolutely positioned) image slide-show that consists of a few images that rotate every few seconds.
To have different areas of the changing image click-able, I also have an unordered list containing the different links, relatively positioned in order to use z-index.
This works just fine in Firefox (3.6), Safari (windows) and Chrome (windows). However, the links seem to disappear behind the images in IE8 and IE7 (I haven´t even tried it in IE6 yet...).
How can I bring the unordered list to the front in IE? (see code below)
Edit: Link to working page
Edit 2: What I did find using the developers tools of IE8, is that the links work and are on top of the slide-show when I remove:
.links a { display: block; }
The result of removing display:block is that I have 5 tiny click-able areas overlaying the image in the upper left corner. As soon as I add it again there is no click-able area anywhere on the image although the developers tools show the squares where the links should be at the correct locations.
The code (I haven´t included the javascript as it only animates opacity and adds / removes the below mentioned classes):
html
<div id="slideshow">
<ul>
<li><img src="/images/header01.jpg" alt="some_image" /></li>
<li><img src="/images/header02.jpg" alt="some_image" /></li>
<li><img src="/images/header03.jpg" alt="some_image" /></li>
</ul>
</div>
<ul class="links">
<li><a href="link1.html"> </a></li>
<li><a href="link2.html"> </a></li>
<li><a href="link3.html"> </a></li>
<li><a href="link4.html"> </a></li>
<li><a href="link5.html"> </a></li>
</ul>
css
ul.links {
z-index: 9999;
position: relative;
}
.links li {
float: left;
}
.links a {
display: block;
width: 192px;
height: 210px;
}
#slideshow {
position: absolute;
left: 0;
top: 0;
}
#slideshow li {
position: absolute;
top: 0;
left: 0;
z-index: 8;
opacity: 0.0;
border: none;
/* ie bugs */
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
}
#slideshow li.active {
z-index: 10;
opacity: 1.0;
}
#slideshow li.last-active {
z-index: 9;
}