Bonjour,
Je suis entrain de faire un site, et pour le design en général j'utilise des div.
Je sais que le comportement d'un div par défaut est de s'agrandir lorsque le texte à l'intérieur est grand (par exemple), il faut pour cela mettre une hauteur automatique. Cependant, dans mon site, toutes mes hauteurs sont en automatiques mais le div concerné ne s'agrandit pas
J'aurais voulu savoir si vous saviez pour quelle raison, je pense peut-etre au paramètres de position (absolute ou relative???), mais malgré mes changements cela ne change rien...
Je poste mon code si sa peut aider (le div qui doit s'agrandir est le div ContenuTexte:
Si quelqu'un peut m'aider se serait génial, je commence a desespérer en CSS lol. Merci d'avance.
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
159
160
161
162
163
164
165
166
167
168 <style type="text/css"> <!-- #pere { position:absolute; left:200px; top:0px; width:931px; height:auto; z-index:5; visibility: visible; } #barre_top { position:absolute; left:5px; top:3px; width:928px; height:auto; z-index:2; visibility: visible; } #principal { position:absolute; left:2px; top:67px; width:928px; height:auto; z-index:3; visibility: visible; } #menugauche { position:absolute; left:5px; top:1px; width:178px; height:auto; z-index:3; } #menudroit { position:absolute; left:743px; top:-1px; width:195px; height:auto; z-index:4; } #menuCentral { position:absolute; left:197px; top:2px; width:551px; height:auto; z-index:5; } #rubriques { position:absolute; left:11px; top:13px; width:168px; height:auto; z-index:3; text-align: center; } #zoneClients { position:absolute; left:12px; top:15px; width:167px; height:auto; z-index:4; text-align: center; } #zoneSaisie { position:absolute; left:10px; top:7px; width:147px; height:auto; z-index:4; text-align: center; } #texteClient { position:absolute; left:10px; top:9px; width:144px; height:auto; z-index:5; text-align: center; } #zoneDownload { position:absolute; left:7px; top:120px; width:176px; height:auto; z-index:5; text-indent: 5px; text-align: center; } .Style2 {font-family: Arial, Helvetica, sans-serif} #menuRSSDroit { position:absolute; left:9px; top:253px; width:171px; height:auto; z-index:6; text-align: center; } #MenuRSSBas { position:absolute; left:-1px; top:388px; width:541px; height:auto; z-index:6; text-align: center; } #horloge { position:absolute; left:7px; top:298px; width:175px; height:auto; z-index:4; } #ContenuTexte { left:2px; top:2px; width:542px; height:auto; z-index:8; position: relative; } --> </style> <body> <div id="pere"> <div id="principal"> <div id="menuCentral"> <div id="ContenuTexte"><font size="2"><strong><span style="font-size: 15px;">Texte bidon qui est grand donc le div doit s'agrandir!!!!????Je n'est pas mis tout le texte d'origine mais je vous assure qu'il est assez grand.</span></strong></font> </p> </div> <div id="MenuRSSBas"><img src="../Templates/menuActualites_03.gif" width="548" height="79" /></div> </div> <div id="menudroit"> <div id="menuRSSDroit"><img src="../Templates/menuFluxRss_03.gif" width="164" height="228" /></div> <div class="Style2" id="zoneDownload"> <p><a href="../pdf.php?fichier=plaquette.pdf"> Télécharger la plaquette du logiciel</a></p> <p><a href="../mp3.php?fichier=bfm.mp3">Télécharger l'interview.</a></p> </div> <div id="zoneClients"> <div id="zoneSaisie"><img src="../Templates/TexteClients_03.gif" width="107" height="13" vspace="3" /><img src="../Templates/ZoneSaisieClients_03.gif" width="143" height="21" /><img src="../Templates/ZoneSaisieClients_03.gif" width="143" height="21" vspace="3" /><img src="../Templates/TexteClientsBis_03.gif" width="69" height="16" /> <img src="../Templates/tick_03.gif" width="10" height="13" /></div> <img src="../Templates/zoneClients.gif" width="161" height="99" /></div> <img src="../Templates/menuInitial_03.gif" width="191" height="491" /></div> <div id="menugauche"> <div id="horloge"><!-- TemplateBeginEditable name="horlogeDate" -->horlogeDate<!-- TemplateEndEditable --></div> <div id="rubriques"><img src="../Templates/rubAccueil.gif" width="165" height="22" /><img src="../Templates/rubSociete.gif" width="165" height="22" vspace="3" /><img src="../Templates/rubActivites.gif" width="165" height="22" /><img src="../Templates/rubClients.gif" width="165" height="22" vspace="3" /><img src="../Templates/rubPartenaires.gif" width="165" height="22" /><img src="../Templates/rubBesoins.gif" width="165" height="22" vspace="3" /><img src="../Templates/rubActualites.gif" width="165" height="22" /><img src="../Templates/rubLogiciel.gif" width="165" height="22" vspace="3" /><img src="../Templates/rubRecrutement.gif" width="165" height="22" /><img src="../Templates/rubLiens.gif" width="165" height="22" vspace="3" /><img src="../Templates/rubContact.gif" width="165" height="22" /></div> <img src="../Templates/menuInitial_03.gif" width="191" height="491" /></div> </div> <div id="barre_top"><img src="../Templates/top_03.gif" width="928" height="60" /></div> </div> </body> </html>
Partager