Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > CSS
CSS Forum d'entraide sur l'utilisation des feuilles de style CSS. Avant de poster : Cours CSS, FAQ CSS, Galerie CSS
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 31/05/2011, 05h01   #1
Membre habitué
 
Inscription : décembre 2007
Messages : 392
Détails du profil
Informations personnelles :
Localisation : Canada

Informations forums :
Inscription : décembre 2007
Messages : 392
Points : 118
Points : 118
Par défaut max-height et IE9

Bonjour,

Je lis sur les differents forums que max-height est compatible avec toutes les versions de IE a partir de IE6.

Pourtant lorsque j'ecris le code ci-dessous cela fonctionne avec les navigateurs FF et chrome mais pas avec IE9 ou Safari.

Code :
<div id="organiser"  style="max-height:250px;min-height:10px;overflow:scroll;">
Existe-il une façon pour que tous les navigateurs comprennent max-height

Merci de votre aide
voyageurdumonde est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/05/2011, 09h07   #2
Modératrice
 
Avatar de Candygirl
 
Femme
Inscription : juillet 2006
Messages : 1 529
Détails du profil
Informations personnelles :
Sexe : Femme
Âge : 40
Localisation : Suisse

Informations forums :
Inscription : juillet 2006
Messages : 1 529
Points : 1 869
Points : 1 869
Hello,

max-height fonctionne en principe depuis IE7. As-tu une page en ligne qui permette de visualiser le problème ? ou, tout au moins, un code plus complet ?
__________________
Les bons réflexes:
  • avant de poser une question:
    règles | faq | tutoriels | recherche
  • clarté, politesse, vocabulaire et orthographe soignés = efficacité
  • remercier ceux qui ont pris le temps d'aider et si c'est le cas
Candygirl est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/05/2011, 13h41   #3
Membre habitué
 
Inscription : décembre 2007
Messages : 392
Détails du profil
Informations personnelles :
Localisation : Canada

Informations forums :
Inscription : décembre 2007
Messages : 392
Points : 118
Points : 118
Bonjour,

Une page en ligne non car je recupere des elements d'une BDD et je n'ai rien securise, mais voici la partie de mon code qui est concernee :

Code :
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<form name="form_reservations" method="post" id="form_reservations" action="save_organisation.php">
 
<div id="organiserbonplan0">
<table width="400" height="200" border="0" cellspacing="0" cellpadding="0">
<tr><td>
 
<div id="organiserbonplan"  style="max-height:250px;min-height:10px;overflow:scroll;">
 
 
 
<table width="370" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td	background="fonddegrad.jpg" width="60" valign="top" align="center"><img src="quefaire.jpg" vspace="5" /></td>
    <td bgcolor="#FFFFFF" WIDTH="10"><img src="0.00t.png" width="10"/></td>
    <td bgcolor="#1D66CD">
 
<table width="305" border="0" cellspacing="2" cellpadding="0" bgcolor="#2274C8">
 
 <tr>
    <td colspan="2"><span class="Style5" >Superbe vue de Montréal</span></td>
    <td width="20"><img src="closesmall.png" width="15"></td>
  </tr> 
<tr>
<td>
 
<input type="image" src="iconecal.gif"  value="Calendrier" onclick="displayCalendar(document.forms[0].theDate15,'dd.mm.yyyy',this);return false"> <input STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;"  type="text" value="02.05.2011" size="10" readonly name="theDate15">
 
</td>
 
<td><span class="Style7" >Prix :</span><span class="Style8" >&lt;10&euro;</span> </td>
 
<td><img src="affichersurcarte.png" width="15"></td>
 
</tr>
<tr>
    <td colspan="3"><span class="Style6" ><textarea COLS=35 ROWS=3  id=mesinfo15 name=mesinfo15>          </textarea></span></td>
  </tr>
<tr>
<td colspan="3" width="310" ><img src="separateur.jpg"></td></tr>
  </table><table width="305" border="0" cellspacing="2" cellpadding="0" bgcolor="#2274C8">
 
 <tr>
    <td colspan="2"><span class="Style5" >Festival de Jazz</span></td>
    <td width="20"><img src="closesmall.png" width="15"></td>
  </tr> 
<tr>
<td>
 
<input type="image" src="iconecal.gif"  value="Calendrier" onclick="displayCalendar(document.forms[0].theDate52,'dd.mm.yyyy',this);return false"> <input STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;"  type="text" value="02.05.2011" size="10" readonly name="theDate52">
 
</td>
 
<td><span class="Style7" >Prix :</span><span class="Style8" >&lt;10&euro;</span> </td>
 
<td><img src="affichersurcarte.png" width="15"></td>
 
</tr>
<tr>
    <td colspan="3"><span class="Style6" ><textarea COLS=35 ROWS=3  id=mesinfo52 name=mesinfo52>          </textarea></span></td>
  </tr>
<tr>
<td colspan="3" width="310" ><img src="separateur.jpg"></td></tr>
  </table><table width="305" border="0" cellspacing="2" cellpadding="0" bgcolor="#2274C8">
 
 <tr>
    <td colspan="2"><span class="Style5" >biodome de montreal</span></td>
    <td width="20"><img src="closesmall.png" width="15"></td>
  </tr> 
<tr>
<td>
 
<input type="image" src="iconecal.gif"  value="Calendrier" onclick="displayCalendar(document.forms[0].theDate131,'dd.mm.yyyy',this);return false"> <input STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #72A4D2;"  type="text" value="02.05.2011" size="10" readonly name="theDate131">
 
</td>
 
<td><span class="Style7" >Prix :</span><span class="Style8" >&lt;10&euro;</span> </td>
 
<td><img src="affichersurcarte.png" width="15"></td>
 
</tr>
<tr>
    <td colspan="3"><span class="Style6" ><textarea COLS=35 ROWS=3  id=mesinfo131 name=mesinfo131>PRENDRE ALLADA              </textarea></span></td>
  </tr>
<tr>
<td colspan="3" width="310" ><img src="separateur.jpg"></td></tr>
  </table>    
</td>
</tr>
</table>
 
 
 
</div>
 
 
 
 
 
 
</td></tr>
<tr><td>
 
 
 
 
<div id="organiserbonplan1" style="max-height:250px;min-height:10px;overflow:scroll;">
<table width="370" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td	background="fonddegrad1.jpg" width="60" valign="top" align="center"><img src="oumanger.jpg" vspace="5" /></td>
    <td bgcolor="#FFFFFF" WIDTH="10"><img src="0.00t.png" width="10"/></td>
    <td bgcolor="#CE7C92">
 
 
 
 
<table width="305" border="0" cellspacing="2" cellpadding="0" bgcolor="#CD5293">
 
 <tr>
    <td colspan="2"><span class="Style5" >La Banquise</span></td>
    <td><img src="closesmall.png" width="15"></td>
  </tr> 
<tr>
<td>
 
 
 
 
 
 
<input type="image" src="iconecal.gif"  value="Calendrier" onclick="displayCalendar(document.forms[0].theDate1,'dd.mm.yyyy',this);return false"> <input STYLE="color: #FFFFFF; font-family: Verdana; font-weight: bold; font-size: 12px; background-color: #DC88BE;"  type="text" value="" size="10" readonly name="theDate1">
 
 
 
 
 
 
 
</td>
 
<td><span class="Style7" >Prix :</span><span class="Style8" >10-15&euro;</span> </td>
<td><div id="listeSelection1"></div></td>
 
</tr>
 
<tr>
	<td colspan="3"><span class="Style6" ><textarea COLS=35 ROWS=1  id=mesinfo1 name=mesinfo1>          </textarea></span></td>
 
  </tr>
<tr>
<td colspan="3" width="310" ><img src="separateur1.jpg"></td></tr>
  </table>    
</td>
</tr>
</table>
 
 
 
</div>
 
 
 
 
 
 
 
 
 
</td></tr>
<tr><td>
 
 
 
 
 
 
<div id="organiserbonplan2" style="max-height:250px;min-height:10px;overflow:scroll;">
<table width="370" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td	background="fonddegrad2.jpg" width="60" valign="top" align="center"><img src="oudormir.jpg"  vspace="5" /></td>
    <td bgcolor="#FFFFFF" WIDTH="10"><img src="0.00t.png" width="10"/></td>
    <td bgcolor="#427F71">
 
 
 
 
 
</td>
</tr>
</table>
 
 
 
</div>
 
 
 
</td></tr>
</table>
 
 
</div>
voyageurdumonde est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/05/2011, 15h13   #4
Membre régulier
 
Homme
Développeur Web
Inscription : octobre 2009
Messages : 72
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Vietnam

Informations professionnelles :
Activité : Développeur Web

Informations forums :
Inscription : octobre 2009
Messages : 72
Points : 99
Points : 99
Tu as des <table> dans les <div> concernée par le max-height, tu n'aurais pas des propriétés height dans ta css sur les éléments de ces tableaux ?
matlow est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/05/2011, 18h35   #5
Membre habitué
 
Inscription : décembre 2007
Messages : 392
Détails du profil
Informations personnelles :
Localisation : Canada

Informations forums :
Inscription : décembre 2007
Messages : 392
Points : 118
Points : 118
Non je n'ai pas de CSS sur les tableaux ni sur la div organiserbonplan.
voyageurdumonde est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/06/2011, 04h04   #6
Membre habitué
 
Inscription : décembre 2007
Messages : 392
Détails du profil
Informations personnelles :
Localisation : Canada

Informations forums :
Inscription : décembre 2007
Messages : 392
Points : 118
Points : 118
Ok apres pas mal de recherche, il semble que IE9 ai decide que max-height n'etait plus utile. (Quelques fois je me demande si les informaticiens ne sont pas payes pour faire C. le peuple )

bref j'ai reuss a m'en sortir avec le CSS comme cela

Code :
1
2
3
4
5
#organiserbonplan {
max-height:250px; 
height: expression(this.scrollHeight>200?"200px":"auto");  
Overflow:auto;
	}
Merci
voyageurdumonde est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/06/2011, 01h01   #7
Modératrice
 
Avatar de Candygirl
 
Femme
Inscription : juillet 2006
Messages : 1 529
Détails du profil
Informations personnelles :
Sexe : Femme
Âge : 40
Localisation : Suisse

Informations forums :
Inscription : juillet 2006
Messages : 1 529
Points : 1 869
Points : 1 869
Citation:
Envoyé par voyageurdumonde Voir le message
Ok apres pas mal de recherche, il semble que IE9 ai decide que max-height n'etait plus utile.
Euh ? On peut savoir les sources sur lesquelles tu te bases ?

A première vue ton max-height de 250px est bien respecté sur IE9...
__________________
Les bons réflexes:
  • avant de poser une question:
    règles | faq | tutoriels | recherche
  • clarté, politesse, vocabulaire et orthographe soignés = efficacité
  • remercier ceux qui ont pris le temps d'aider et si c'est le cas
Candygirl est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 17h31.


 
 
 
 
Partenaires

Hébergement Web