Bonjour,
une fois n'est pas coutume mon meilleur ami IE n'affiche pas comme son ami Firefox ceci:
html:
CSS:
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 <html> <head> <link href="test.css" rel="stylesheet" type="text/css"> </head> <body> <center> <div id="page"> <div id="partieGauche"> gauche </div> <div id="partieHaut"> haut </div> <div id="partieMilieu"> milieu </div> <div id="partieBas"> Bas </div> </div> </center> </body> </html>
Donc sous firefox les propriétés height sont respectées mais pas sous IE qui fixe la hauteur de la div selon ce qu'elle contient.
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 body { margin: 5px 0 0 5px; padding: 0; } div#page { background-color:purple; margin:auto; width:1000px; height:100%; } div#partieGauche { width: 200px; height: 97%; background-color: red; float:left; } div#partieHaut { width: 800px; height: 7%; background-color:yellow; float:left; } div#partieMilieu { width: 800px; height:90%; background-color: green; float:left; } div#partieBas { width:1000px; height:3%; background-color:black; clear:both; }
Une astuce pour contourner ce problème?
P.S: Je ne dois pas fixer la hauteur mais je dois la laisser en pourcentage.
Partager