• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

A-Tag im IE will nicht reagieren

Lord Lommel

New member
Folgender Code:

<html>
<head>
<style>
a {
background-color: transparent;
position: absolute;
height: 19px;
width: 18px;
cursor: pointer;
}
a:hover {
background-color: #FF0000;
}
a div {
overflow: hidden;
position: absolute;
top: 1px;
left: 1px;
height: 17px;
width: 16px;
}
a div img {
border-width: 0px;
position: absolute;
top: 0px;
}
a:hover div img {
top: -17px;
}
</style>
</head>
<body>
<a href="test.html">
<div>
<img src="test.gif">
</div>
</a>
</body>
</html>

Das Problem ist, daß im IE der Hover das Bild nicht hochschiebt und auch beim Klicken nichts passiert. Im Firefox geht das aber. Das Bild soll per img-Tag und nicht als Hintergrundbild eingebunden werden. Hat jemand einen Tip für mich ?

Vielen Dank !
 

Anhänge

  • test.gif
    test.gif
    468 Bytes · Aufrufe: 23
Daran lags aber nicht, es ging auch mit Spans nicht. Im Endeffekt hab ichs hinbekommen, indem ich das img direkt in den Anker geworfen und dann das Mouseover mit clip und margin geregelt habe.
 
Zurück
Oben