Bonsoir,
je débute en HTML. je galère pour insérer une photo et son titre dans une case. Voici mon exemple :
HTML :
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 <h2> Bloc 1/2 </h2> <div class="boxdemi"> <img src ="Images/Porte.jpg" alt="" class="imgpourcent"> </div><div class="boxdemi"></div> <h2>bloc 1/3 </h2> <div class="boxtiers"></div> <div class="boxtiers"></div> <div class="boxtiers"></div> <h2> bloc 3/4 + bloc 1/4</h2> <div class="boxtroisquart"></div> <div class="boxtroisquart"></div> <div class="boxtroisquart"></div> <h2> bloc 1/4</h2> <div class="boxquart"></div> <div class="boxquart"></div> <div class="boxquart"></div> <div class="boxquart"></div> </div> </body> </html> <p> </p>
et mon CSS :
Code css : 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 h2{ padding:15px; line-height:24px; font-size:24px; text-align: center; color:cyan; font-weight:400; text-transform: uppercase; } .boxdemi+.boxdemi { margin-left: 20px; } .boxdemi { display: inline-block; padding: 15px; height: 400px; width: 570px; background-color: white; } .img2 { width: 100%;} .boxtiers+.boxtiers{ margin-left: 20px; } .boxtiers { display: inline-block; height: 400px; background-color: gold; padding: 15px; width: 370px; } .boxtroisquart { height: 400px; display: inline-block; background-color: blue; margin: 15px; padding: 15px; width: 280px; padding: 15px; } .boxquart+.boxquart{ margin-left: 20px; } .boxquart { height: 400px; display: inline-block; background-color: black; padding: 15px; width: 272px; }
Merci pour votre aide
Partager