Bonjour
je débute en html je dois réaliser une page comportant un titre centré puis deux images avec des liens en dessous
voici mon code :
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 <!DOCTYPE html> <html lang="fr"> <head> <meta charset="utf-8"> <meta name="keywords" content="boutique"> <title>B.A.B.A</title> <link rel="Stylesheet" href="style.css"> </head> <body> <div class="main"> <h1 class="title">Promotion de fêtes de Noël</h1> <div class="pic"> <img src="images/nike.jpg" alt="Logo NIKE" width="300" height="300"> <a href="http://www.nike.com">Cliquez-ici</a> </div> <div pic="pic"> <img src="images/under.png" alt="Logo UNDER ARMOUR" width="300" height="300"> <a href="https://www.underarmour.fr/fr-fr/">Cliquez-ici</a> </div> </div> <hr> <footer> <p>© Pat66 2022 </p> </footer> </body> </html>
mon fichier CSS:
voici le résultat :
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 body { font-size:80%; font-style:normal; font-family:verdana; background-color:#fd6c9e; color:#87ceeb; padding:0%; width:100%; } .p { font-size:80%; font-style:italic; } .title{ color:white; text-align:center; } .main { text-align:center; margin-left:35%; } .title{ text-align:center; } .pic { width:30%; margin:1%; } .pic a { font-size:larger; } a:link { color:white; } a:visited { color:green; } a:hover { text-decoration:underline; } footer{ float:right; font-size:80%; padding-right:2%; }
Pourrais-je avoir des indications pour centrer mes images ainsi que les liens en dessous des images ?
Merci.
Partager