• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

div darstellen und verstecken

magifix

Neues Mitglied
Hallo an alle,ich möchte wenn man über ein Feld fährt ein Div darstellen und wieder verstecken.nachfolgende lösung funktioniert im Mozilla, jedoch nicht im Explorerkann mir jemand bitte sagen wo da der Fehler liegt? <style> div#hide { display: none; } div#show:hover div#hide { display: block; position:absolute; left:100px; top:30px; }</style><center> <div id="show"> <h1>Hover 1 this line!</h1> <div id="hide"><h2>Youre hovering the 1 line!</h2></div> </div> <div id="show"> <h1>Hover 2 this line!</h1> <div id="hide"><h2>Youre hovering the 2 line!</h2></div> </div> <div id="show"> <h1>Hover 3 this line!</h1> <div id="hide"><h2>Youre hovering the 3 line!</h2></div> </div></center>
 
Hallo an alle,ich möchte wenn man über ein Feld fährt ein Div darstellen und wieder verstecken.nachfolgende lösung funktioniert im Mozilla, jedoch nicht im Explorerkann mir jemand bitte sagen wo da der Fehler liegt?
Code:
<style>    div#hide {        display: none;        }    div#show:hover div#hide {        display: block;        position:absolute;        left:100px;        top:30px;    }</style><center>    <div id="show">        <h1>Hover 1 this line!</h1>        <div id="hide"><h2>Youre hovering the 1 line!</h2></div>    </div>        <div id="show">        <h1>Hover 2 this line!</h1>        <div id="hide"><h2>Youre hovering the 2 line!</h2></div>    </div>        <div id="show">        <h1>Hover 3 this line!</h1>        <div id="hide"><h2>Youre hovering the 3 line!</h2></div>    </div></center>

Hallo magifix,

IE6 kennt hover nur für Links, daher wirst Du Whatever:hover brauchen...

Grüße
Bernhard
 
Zurück
Oben