ERLEDIGT
JA
JA
ANTWORTEN
6
6
ZUGRIFFE
2917
2917
EMPFEHLEN
-
Hallo zusammen,
der folgende Quelltext bewirkt einen Text hover Effekt. Nun möchte ich aber auch, dass sich der Rahmen des Bildes daneben mit verändert (gleiche Farbe). Wenn ich über das Bild fahre, soll sich wiederum auch die Textfarbe ändern.
In Mozilla funktioniert das komischerweise auch bei dem unteren Quelltext. (beim IE zum Beispiel nicht)
<html>
<head>
<title>Untitled Document</title>
</head>
<style type="text/css">
<!--
a:link { color:#ffffff; text-decoration:none; }
a:visited { color:#ffffff; text-decoration:none; }
a:active { color:#6fC1C1; text-decoration:none; }
a:hover { color:#6fC1C1; text-decoration:none; }
-->
</style>
<body bgcolor="#000000">
<a href="test.htm">test<img src="../test/1.gif" width="70" height="70"></a>
</body>
</html>
Kann mir jemand helfen?
Freue mich auf Antworten
Grüße
Geändert von Sonador (03.10.04 um 23:02 Uhr)
-
Jetzt war ich wohl etwas voreilig, denn ich habe eine scheinbare Möglichkeit gefunden.
<style type="text/css">
<!--
a:link { color:#ffffff; text-decoration:none; }
a:visited { color:#ffffff; text-decoration:none; }
a:active { color:#6fC1C1; text-decoration:none; }
a:hover { color:#6fC1C1; text-decoration:none; }
img {border:0pt}
a.Rahmen {border-width:1pt; border-style:solid; border-color:#000000}
a.Rahmen:hover span { border-width:1pt; border-style:solid; border-color:#66CCCC }
-->
</style>
<body bgcolor="#000000">
<a class=Rahmen href="test.htm">test<span><img src="../test.gif" width="100" height="100" alt=""></span></a>
</body>
</html>
Nur beim Mozilla bringt er den Rahmen nicht einwandfrei.
Vielleicht weiß ja jemand eine elegantere Lösung?!
-
Hi,
versuchs mal hiermit
CiaoCode :1 2 3 4 5 6 7 8 9 10 11
<style type="text/css"> <!-- a:link { color:#ffffff; text-decoration:none; } a:visited { color:#ffffff; text-decoration:none; } a:active { color:#6fC1C1; text-decoration:none; } a:hover { color:#6fC1C1; text-decoration:none; } a:link img{border: 2px solid #ffffff;} a:hover img{border: 2px solid #6fC1C1;} //--> </style>
Quaese
Vielleicht muss man manchmal vom Weg abkommen, um nicht auf der Strecke zu bleiben!
----
Der "Fortsetzungsroman" auf www.leuteforum.de
New kind to realize large scalable projects with jQuery: jQuery SDK
-
Ja wunderbar, das funktioniert. Danke.
-
Jetzt stehe ich vor einem neuen Problem.
Ich möchte das Bild neu positionieren, dann funktioniert der Rahmen aber nicht mehr, wenn ich über den Text fahre...
<style type="text/css">
<!--
a:link { color:#ffffff; text-decoration:none; }
a:visited { color:#ffffff; text-decoration:none; }
a:active { color:#6fC1C1; text-decoration:none; }
a:hover { color:#6fC1C1; text-decoration:none; }
a:link img{border: 2px solid #ffffff;}
a:visited img{border: 2px solid #ffffff;}
a:active img{border: 2px solid #ffffff;}
a:hover img{border: 2px solid #66CCCC;}
.1 { position:absolute; top:300px; left:191px;}
-->
</style>
<body bgcolor="#000000">
<a href="test.htm">test<img class=1 src="../test1.gif" width="70" height="70"></a>
</body>
</html>
-
Hi,
das gleiche Problem hatte ich auch schon. Wenn Du im Ausgangs-Hover height: auto;
angibst, sollte es funktionieren.
CiaoCode :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<style type="text/css"> <!-- a:link { color: #ffffff; text-decoration:none; } a:visited { color:#ffffff; text-decoration:none; } a:active { color:#6fC1C1; text-decoration:none; } a:hover { [B]height: auto;[/B] color:#6fC1C1; text-decoration:none; } a:link img{ border: 2px solid #ffffff;} a:hover img{ border: 2px solid #6fC1C1;} .img1{ position:absolute; top:300px; left:191px;} //--> </style>
Quaese
Vielleicht muss man manchmal vom Weg abkommen, um nicht auf der Strecke zu bleiben!
----
Der "Fortsetzungsroman" auf www.leuteforum.de
New kind to realize large scalable projects with jQuery: jQuery SDK
-
Auch wenn mir diese Lösung schleierhaft ist, sie funktioniert! Vielen dank nochmals.
Ähnliche Themen
-
Hover miteinander Verbinden (Link Text & Link Bild)
Von vodka im Forum Javascript & AjaxAntworten: 1Letzter Beitrag: 17.05.10, 13:20 -
Text bei Hover über Bild
Von Superdok im Forum CSSAntworten: 10Letzter Beitrag: 11.11.09, 19:32 -
Hover bei Text Link soll Bild in Div anzeigen
Von gnuisnotunix im Forum CSSAntworten: 7Letzter Beitrag: 04.08.09, 19:51 -
Bild ändern bei Text-Hover
Von CantNo im Forum Javascript & AjaxAntworten: 4Letzter Beitrag: 03.02.09, 13:43 -
Bei Hover Bild+Text einblenden
Von kirchel im Forum Flash PlattformAntworten: 2Letzter Beitrag: 26.09.06, 14:47






Login





