Bonjour les amis,
J'ai un souci de centrage de bannière. Je suis encore débutant en web et je vous transmet donc mon code pour savoir comment centrer la banniere au top nommée "header21.png"
Mon CSS est le suivant :
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 <html> <head> <title>Accueil - Métropolitains</title> <link rel="stylesheet" href="./css/style.css" type="text/css" media="screen" title="Normal" /> </head> <body> <div id="header"><!--Entête / bannière à centrer--> <img src="header21.png"> </div> <div id="conteneur"> <div id="sidebar1"><!--Colonne gauche / Administration--> <h3>Administration</h3> <form method="post" action="../admin.php"> <label for="pseudo"><strong>Login :</strong><br /></label> <input type="text" name="pseudo" id="pseudo" value="" /><br/><br/> <label for="pass"><strong>Mot de passe :</strong><br /></label> <input type="password" name="pass" id="pass" /><br/> <br/> <input type="submit" name="OK" value="Se connecter !"/> </form> </div> <div id="sidebar2"><!--Colonne droite / Commissions--> <h3>Commissions</h3> <a href="#"><img src="stylexp.png" width="16" height="16"> Cinéma, Théatre </a><br /> <a href="#"><img src="stylexp.png" width="16" height="16"> Sport </a><br /> <a href="#"><img src="stylexp.png" width="16" height="16"> Loisir et spectacle </a><br /> <a href="#"><img src="stylexp.png" width="16" height="16"> Culture </a><br /> <a href="#"><img src="stylexp.png" width="16" height="16"> Temps forts </a><br /> </div> <div id="flashinfodiv"><!--Section flash info--> <h3> <img src="flashinf.png" width="213" height="43"></h3> <p>FlashInfo1</p> <hr /> </div> <div id="actudiv"><!--Section actualité--> <h3> <img src="actu.png" width="213" height="43"></h3> <p>News1</p> </div> </div> <div id="footer"> Plan du site - mentions légales </div> </body> </html>
Désolé du gros "PATé" mais pas le choix. En tout cas merci 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158 body { font: 100% Verdana, Arial, Helvetica, sans-serif; background:#FFF; margin: 0; padding: 0; text-align: center; color:#000; } a img { border: none ; } a img:hover { border: none ; } #conteneur { margin: 0 auto; text-align: left; border-top: 1px solid; border-bottom: 1px solid; height: 100%; } #header { width: 869px; height: 157px; background:#FFFFFF; } #header h1 { margin: 0; text-align:center; } #sidebar1 { display:block; float:left; width: 220px; height: 100%; background: #FFFFFF; padding: 15px 0; font-size: 85%; text-align: left; border-right: 1px solid black; } #sidebar1 form { display:block; float: left; font-size: 85%; margin-left: 13%; text-align: center; } #sidebar1 h3 { display:block; width:188px; height:20px; line-height:18px; background-image:url(../fd_blue.png); color:white; text-decoration:none; font-size:12px; margin-left: 10px; margin-right: 10px; text-align: center; } #sidebar2 { display:block; float:right; width: 220px; height: 100%; background:#FFFFFF; padding: 15px 0; border-left: 1PX solid black; font-size: 15px; } #sidebar2 h3 { width:188px; height:20px; line-height:18px; background-image:url(../fd_blue.png); color:white; text-decoration:none; font-size:12px; text-align:center; margin-left: 10px; margin-right: 10px; } #sidebar2 a { display:block; text-decoration:none; padding-left:10px; color:black; } #sidebar2 a:hover { display:block; background-color:#0099FF; color:black; text-decoration:none; } #sidebar2 li { color: #000; text-decoration: none; } #flashinfodiv { margin: 5px 225px 5px 225px; height: auto; } #actudiv { margin: 5px 225px 5px 225px; height: auto; min-height: 100% } #contact { margin: 5px 225px 5px 225px; border: 2px solid #0099FF; padding: 10 10; font-size: 12px; height: auto; min-height: 100% } #part { margin: 5px 225px 5px 225px; font-size: 13px; padding: 10 10; height: auto; min-height: 100% } #part p:first-letter { padding-left:10px; font-weight:bold; font-size:120%; } #footer { padding: 0 10px; background-color: #969696; height: 19px; font-size: 12px; text-align: right; margin-bottom: 2px; } #footer p { margin: 0; padding: 2px 0; } [if IE]> <style type="text/css"> #sidebar2, #sidebar1 { padding-top: 30px; } #mainContent { zoom: 1; padding-top: 15px; } /* hasLayout nécessaire pour éviter plusieurs bogues */ </style> <![endif]
Partager