Bonjour
suite au sujet posté précédement, http://www.developpez.net/forums/d60...menu-agreable/, je vient de me remettre sur mon projet, mais je suis encore bloqué (pas bien doué, c'est vrai)
Pour rappele, je veut faire un menu en CSS, language où je débute, composé de 2 étages type digg.com.
On peut maintenant survoler les textes de l'etage le plus en haut, les images derrière le texte changent.
J'ai cherché à faire la même chose pour la seconde barre, mais là ça marche plus. Rien ne se passe (pas de changeemnt d'images si l'on utilise la classe active, pas de changement d'images en passant dessus, et en plus, la possibilitée de cliquer sur le texte (lien hypertexte) à disparus
Voiçi le code, il est trés simple, c'est pourquoi je ne voit pas l'erreur...
Le fichier html:
Le fichier style.css
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 <html> <head> <link href="style.css" rel="stylesheet" type="text/css"/> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title></title> </head> <body> <div id="topbar"> <a href="/toppage1.html"><span>All</span></a> <a href="/toppage2.html" class="active"><span>News</span></a> <a href="/toppage3.html"><span>Video</span></a> <a href="/toppage4.html"><span>Images</span></a> </div> <div id="middlebar"> <b href="/midpage1.html"><span>Technology</span></b> <b href="/midpage2.html"><span>World</span></b> <b href="/midpage3.html" class="active"><span>Science</span></b> <b href="/midpage4.html"><span>Gaming</span></b> </div> </body> </html>
Désolé de déranger encore du monde avec quelque chose qui doit être évident, mais je ne vois vraiment pas...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123 #topbar { font-family:Arial; font-size:14px; color:#3b5d14; background:#b2d281; font-weight:bold; padding:6px; overflow:auto; height:3.5%; display:block; clear:both; } #topbar a { color:#3b5d14; text-decoration:none; margin:0 10px; height:23px; line-height:23px; float:left; display:block; } a.active { height:23px; line-height:23px; background:url(tb_a.png) right top no-repeat; padding-right:10px; } a.active span { background:url(tb_span.png) left top no-repeat; height:23px; display:block; padding-left:10px; } a:hover { height:23px; line-height:23px; background:url(tb_a_hover.png) right top no-repeat; padding-right:10px; } a:hover span { background:url(tb_span_hover.png) left top no-repeat; height:23px; display:block; padding-left:10px; } #middlebar { font-family:Arial; font-size:11px; color:#3b5d14; background:#90b557; font-weight:bold; padding:6px; overflow:auto; height:3.5%; display:block; clear:both; } #middlebar b { color:#3b5d14; text-decoration:none; margin:0 5px; padding-right:10px; height:23px; line-height:23px; display:block; float:left; background:url(mb_a.png) right top no-repeat; } #middlebar b span { background:url(mb_span.png) left top no-repeat; height:23px; display:block; padding-left:10px; } b.active { height:23px; line-height:23px; background:url(mb_a_active.png) right top no-repeat; padding-right:10px; } b.active span { background:url(mb_span_active.png) left top no-repeat; height:23px; display:block; padding-left:10px; } b:hover { height:23px; line-height:23px; background:url(mb_a_hover.png) right top no-repeat; padding-right:10px; } b:hover span { background:url(mb_span_hover.png) left top no-repeat; height:23px; display:block; padding-left:10px; }
Partager