Willkommen, Gast ( Anmelden | Registrierung )     [ Hilfe | Mitglieder | Suche ]

 
Reply to this topicStart new topic
> CSS - Hover Problem
gunwalt
Beitrag Mon. 9. March 2009, 13:03
Beitrag #1


Advanced Member
********

Gruppe: AdvancedMembers
Beiträge: 1.126
Mitglied seit: 27.06.2006
Mitglieds-Nr.: 7



Hallo,
brauche eine Tipp in Sachen CSS. Warum funktioniert der "Hover" auf "Item four" nicht?


QUELLTEXT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
<style type="text/css">
#navcontainer{margin: 0px;padding: 0px;}
#navcontainer ul{margin: 0px;padding: 0px;list-style-type: none;text-align: left;}
#navcontainer ul li { float: left; }

#navcontainer ul li a
{text-decoration: none;background: url(nav_1.gif) no-repeat bottom center;font-size: 10px/12px;float: left;margin: 0px;height: 67px;width: 75px;padding-top: 13px;padding-right: 15px;padding-bottom: 0px;padding-left: 10px;}

#navcontainer li a:hover{background: url(nav_1_.gif) no-repeat bottom center;color: #000000;}

#navcontainer ul li #nav_4{text-decoration: none;background: url(nav_5.gif) no-repeat bottom center;float: left;margin: 0px;height: 67px;width: 75px;padding-top: 13px;padding-right: 15px;padding-bottom: 0px;padding-left: 10px;}


#navcontainer li a:hover #nav_4{background: url(nav_5_.gif) no-repeat bottom center;color: #ff9900;}
</style>
</head>
<body>

<div id="navcontainer">
<ul id="navlist">
<li id="active"><a href="#" id="current">Item one</a></li>
<li><a href="#">Item two</a></li>
<li><a href="#" id="nav_4">Item four</a></li>
</ul>
</div>
</body>
</html>


--------------------
------
Ich gehe spazieren durch Gelsenkirchen
Go to the top of the page
 
+Quote Post
saschapi
Beitrag Mon. 9. March 2009, 13:36
Beitrag #2


Advanced Member
********

Gruppe: Moderators
Beiträge: 911
Mitglied seit: 26.06.2006
Wohnort: Essen; Ruhrgebiet
Mitglieds-Nr.: 4



QUELLTEXT
#navcontainer li a#nav_4:hover {background: url(nav_5_.gif) no-repeat bottom center;color: #ff9900;}


Ohne test! smile.gif


--------------------
Go to the top of the page
 
+Quote Post
andi
Beitrag Mon. 9. March 2009, 13:37
Beitrag #3


purist
********

Gruppe: AdvancedMembers
Beiträge: 1.525
Mitglied seit: 30.06.2006
Wohnort: luzern (schweiz)
Mitglieds-Nr.: 16



hallo gunwalt

weil folgende zeile falsch ist:
QUELLTEXT
#navcontainer li a:hover #nav_4{background: url(nav_5_.gif) no-repeat bottom center;color: #ff9900;}


du hast kein element mit der id nav_4 im a-element, das a-element besitzt die id, korrekt:
QUELLTEXT
#navcontainer li a#nav_4:hover {background: url(nav_5_.gif) no-repeat bottom center;color: #ff9900;}


gruss andi


edit: mist, zu langsam tongue.gif


--------------------
Go to the top of the page
 
+Quote Post
gunwalt
Beitrag Mon. 9. March 2009, 18:42
Beitrag #4


Advanced Member
********

Gruppe: AdvancedMembers
Beiträge: 1.126
Mitglied seit: 27.06.2006
Mitglieds-Nr.: 7



Die Kleinigkeiten sind's, wie immer - besten Dank.


--------------------
------
Ich gehe spazieren durch Gelsenkirchen
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 Besucher lesen dieses Thema (Gäste: 1 | Anonyme Besucher: 0)
0 Mitglieder:

 



RSS Vereinfachte Darstellung Aktuelles Datum: 27.4.24 - 20:40

Sefrengo ist ein eingetragenes Markenzeichen und urheberrechtlich geschützt.
Copyright 2009 Design & Daten, Alle Rechte vorbehalten.