Bonjour tout le monde,
J'ai réussi à faire un menu en utilisant les listes ( ul li), j'ai mis que le div du menu soit légèrement arrondies jusqu'à ici y a aucun problème. mais le hover rend le menu carré. Ci-après le code, et merci pour vos intervention.
style.css
page.html
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
124
125
126
127
128
129
130
131
132
133
134 body { background-color:#F2F2F2; /* Fond de page bleu clair */ margin: 0px; /* Supprimer toute marge à la page : le texte colle les bordures */ } #wrapper{ margin-left: 8%; /*margin: 0px auto 0px auto;*/ width:85%; } #header{ height:100%; background: #FFF; padding:7px 15px; /*margin-top: 15px;*/ border-top: : 3px solid #197262; } .logo{ float:left; margin-left: 0px; margin-top: 0px; margin-bottom: 15px; } h1{ text-align: center; font-family: "arial, verdana", cursive; color: #003366; } /* Début de css pour le menu */ #navbar { /* Ensemble du menu */ clear: both; padding: 0px; /* pas de marge intérieure */ margin:0px; /* ni extérieure */ height: 30px; background-color: #003366; text-align: center; border-bottom: 3px solid grey; border-top-left-radius: 15px; border-top-right-radius: 15px; } #navbar ul { margin: 0px; padding:0px; line-height: 30px; } #navbar li { list-style: none; float: left; position:relative; border-right:1px; border-right-style:inset; } #navbar ul li a { font-family: 'Arial', sans-serif; font-size: 12px; font-weight:bold; text-decoration: none; width: 150px; display:block; color: #FFF; } #navbar ul li :hover{ background-color: #C3BFBB; color: #003366; } /* Fin Css pour le menu */ /* Début de css pour le contenu */ #content{ position:relative; background-color:#FFFFFE; padding:7px 20px; margin-top:4px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; min-height:500px; } #annonce_div{ float:left; background-color: green; width: 67%; margin-top: 10px; } #slide_show{ float:left; width: 30%; margin-left: 8px; margin-top: 10px; padding:10px; box-shadow: 0px 0px 10px #aaa, 0px 0px 0px #999, 0px 0px 10px #003366; } hr { display: block; clear: both; margin-top: 20px; border-top: 1px solid #003366; box-shadow: 3px 0px 5px #DAD8D6; } /* Fin de css pour le contenu */ /* Début de css pour le pied de page */ #footer{ float:left; width:100%; margin-top:4px; background: #FFF; text-align:center; font-family:'Century Gothic', sans-serif; font-size: 12px; } /* Fin de css pour le pied de page */
Code html : 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 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Site pour les annonces de l'immobilier</title> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="css/default.css"/> </head> <body> <div id="wrapper"> <div id="header"><!-- beginning of header --> <img src="images/canadaimmo.png" alt="Immobilier" title="Immobilier" class="logo"/> <h1> Site d'immobilier au Canada </h1> <div id="navbar"><!-- beginning of menu --> <ul> <li><a href="">Index</a></li> <li><a href="">Annonces</a></li> <li><a href="">Nos partenaires</a></li> <li><a href="">Contactez-nous</a></li> <li><a href="">Qui sommes nous</a></li> <li><a href="">Nos liens</a></li> <li><a href="">FAQ</a></li> </ul> </div><!-- End of menu --> </div><!-- End of header --> <div id="content"><!-- beginning of content --> <div id="annonce_div"> Les annonces </div> <div id="slide_show"> Lancer votre recherche <input name="Recherche" type="text" size="20"/> <input name="recherche" type="button" id="recherche" value="Ok !"/> <hr/> <h3> Publicité </h3> <a href="http://www.zgui.com/techno/admin/?utm_source=developpez&utm_medium=pave&utm_campaign=techno&utm_content=admin" target="_blanc"> <img src="images/pub1.png" width="100%" height="100%" alt="publicité" title="publicité" class="logo"/></a> <hr/> <h3> Nos partenaires </h3> </div> </div><!-- End of content --> <div id="footer"><!-- beginning of footer --> <p>Tous droit réservé - 2013</p> </div> <!-- End of footer --> </div> <!-- End of wrapper --> </body> </html>
Partager