Bonjour,
j'ai un petit problème en css :voici mon petit code qui fonctionne normalement sauf qu'en remplacent <a:href="#">lien1</a> par <a:href="http://localhost:8080:localhost/monsite/mapage">lien1</a>(pour charger la page consernée),
les propriétés de style ne sont plus applicable.En faite ce que veux obtenir c'est en cliquant sur un lien du menu,ce lien doit avoir un font vert jusqu'à le clic sur un nouveau lien.
mon code:
Je vous remercie d'avance pour votre aide
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> ul#menu { width: 100%; height: 43px; background: #FFF url("images/menu-bg.png") top left repeat-x; font-size: 0.8em; font-family: "Lucida Grande", Verdana, sans-serif; font-weight: bold; list-style-type: none; margin: 0; padding: 0; } ul#menu li { display: block; float: right; margin: 0 0 0 5px; border-left:1px solid; border-top:1px solid; border-right:1px solid; } ul#menu li a { height: 43px; color: #777; text-decoration: none; display: block; float: left; line-height: 200%; padding: 8px 15px 0; } ul#menu li a:link { background: #FFF url("images/current-bg.png") top left repeat-x; color: #000; font-weight:bolder; } ul#menu li a:hover { background: #FFF url("images/current-bg.png") top left repeat-x; color: #000; font-weight:bolder; } ul#menu li a:focus { background: #FFF url("images/current-bg.png") top left repeat-x; color: #000; font-weight:bolder; } ul#menu li a:active{ color: #000; background: #FFF url("images/current-bg.png") top left repeat-x; padding: 5px 15px 0; } </style> </head> <body> <ul id="menu"> <li><a href="#" title="">Home</a></li> <li><a href="#" title="">Products</a></li> <li><a href="#" title="">Contact</a></li> <li><a href="#" title="">Label 4</a></li> <li><a href="#" title="">Label 5</a></li> </ul> </body> </html>





Répondre avec citation




Pas de question technique par MP !



Partager