Bonjour,
je débute en CSS et je fais un petit site.
J'essaie d'aligner 2 blocs dans un blocs mais je n'y arrive pas.
J'ai un bandeau qui fait 1080px x 129px et j'aimerais y mettre un bloc logo de 473 x 129 et un autre titre_bandeau de 607 x 129. Je pensais cela simple mais mon 2eme bloc se met systématiquement à la ligne...
J'ai sans doute oublié un propriété mais laquelle?
voici mon code CSS:
et 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 #page { background-color : white; } #site { background-color : #fffbd2; margin-left: auto; margin-right: auto; width : 1080px; height : auto; } #haut_bandeau { width : 1080px; height : 2px; background-image : url(decoupage/haut_bandeau.png); } #bandeau { background-color : #fff8bd; width : 1080px; height : 129px; margin : 0; padding : 0; } #logo { width : 473px; /* border : 1px solid red;*/ height : 129px; background-image:url(decoupage/logo.png); background-repeat : no-repeat; } #titre_bandeau { width : 607px; height : 129px; } #pied_bandeau { width : 1080px; height : 15px; background-image:url(decoupage/pied_bandeau.png); }
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 <body> <div id="page"> <div id="site"> <div id="haut_bandeau"></div> <div id="bandeau"> <div id="logo"></div> <div id="titre_bandeau">blablabla</div> </div> <div id="pied_bandeau"></div> <div id="contenu"> test <br /> test <br /> test <br /> </div> </div> </div> </body>
Partager