Posts: 876
Name: Matt Pealing
Location: England, north west
|
I've made a basic interactive CSS / jQuery map of the UK in which each country is highlight as you hover over it.
Here is a link to it:
http://tinyurl.com/3u9gnw6
I have highlighted each country with a red border so that you can see the dimensions of each image.
Of course, it works fine in all browsers bar IE, although I'm a little surprised to see that it doesn't even work in IE9.
It seems as though IE just isn't reading the z-index properties properly. It's like you have to hover completely out of the map and then carefully hover over your country of choice, without touching any of the others.
It's quite hard to explain my problem but you'll see what I mean if you try it.
Here is my CSS for the associated element(s):
Code:
#map-uk {
position: relative;
height: 316px;
z-index: 1000;
}
#map-uk .map {
position: absolute;
top: 15px;
left: 35px;
z-index: 0;
}
#map-uk a {
position: absolute;
border: red solid 1px;
}
#map-uk a img {
display: none;
}
#map-uk #map-uk-hover-scotland {
width: 107px;
height: 142px;
right: 71px;
top: 14px;
z-index: 2;
}
#map-uk #map-uk-hover-england {
width: 143px;
height: 184px;
bottom: 5px;
right: 4px;
z-index: 1;
}
#map-uk #map-uk-hover-wales {
bottom: 49px;
right: 87px;
width: 55px;
height: 68px;
z-index: 4;
}
#map-uk #map-uk-hover-ireland {
width: 54px;
height: 50px;
left: 80px;
top: 135px;
z-index: 3;
}
Does anyone know what might be missing / incorrect to prevent it working in IE? I know about the z-index bug (which I think I've fixed with the 'z-index: 10' property on #map-uk. But I'm still getting the issue mentioned above.
|