Problème Hauteur en %

Problème Hauteur en % - HTML/CSS - Programmation

Marsh Posté le 10-06-2005 à 14:41:57    

Bonjour,
 
Bon, j'ai un problème qui me titille depuis maintenant quelques jours, je n'arrive pas à le résoudre.
 
Voilà, donc j'ai fait une page qui est divisée en 5 parties :
 
_une entete
_une colonne avec menu a gauche
_une colonne avec menu a droite
_un pied de page
_et un contenu au centre
 
J'ai réglé ces parties de la sorte :
 
_colonne gauche >> height:100%; width:160px;
_colonne droite >> height:100%; width:160px;
_pied de page >> height:30px; width:100%; bottom:0px;
_centre (cadran)>> height:50%; width:50%;
 
Bon, quand je fais un aperçu dans ie (F12) sous Dreamweaver, tout marche nikel, les colonnes font bien la hauteur de la page etc, mon cadran du centre, s'adapte a son contenu, le pied de page est toujours bien en bas etc, enfin tout se passe bien.
 
Le problème : ma page contient des bout de code en asp, je la test donc en local en utilisant http://localhost/dossier/test.asp
 
Bon, ca marche MAIS les hauteur en % ne sont plus pris en compte. donc mes colonnes n'apparaisse meme plus. Mon pied de page reste bloqué au meme endroit, mon cadran n'apparai plus non plus, enfin bref, tout ce qui a des hauteur en % ne marchent plus.
 
Je ne sais pas comment résoudre ce probleme.
 
Help me !!! please

Reply

Marsh Posté le 10-06-2005 à 14:41:57   

Reply

Marsh Posté le 10-06-2005 à 14:54:45    

quand je clique sur le lien il me dit qu'il trouve pas la page... :cry:

Reply

Marsh Posté le 10-06-2005 à 14:55:03    

:ange:

Reply

Marsh Posté le 10-06-2005 à 15:00:21    

file nous le code HTML généré de ta page et le code CSS de ta page
MMe soleil est en vacances donc elle peut po nous aider

Reply

Marsh Posté le 10-06-2005 à 16:31:12    

Voici ma page asp :
 

Code :
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <!-- ============================================== HEAD ================================================================ -->
  5. <head>
  6. <title>=== TRANSFERT ===</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  8. <!-- Appel de la CSS externe -->
  9. <link rel="stylesheet" href="transfert.css">
  10. <!-- Script pour intégrer des images png n'importe où dans le document -->
  11. <script language="JavaScript">
  12. function correctPNG()
  13. {
  14. for(var i=0; i<document.images.length; i++)
  15. {
  16. var img = document.images[i]
  17. var imgName = img.src.toUpperCase()
  18. if (imgName.substring(imgName.length-3, imgName.length) == "PNG" )
  19. {
  20. var imgID = (img.id) ? "id='" + img.id + "' " : ""
  21. var imgClass = (img.className) ? "class='" + img.className + "' " : ""
  22. var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
  23. var imgStyle = "display:inline-block;" + img.style.cssText
  24. var imgAttribs = img.attributes;
  25. for (var j=0; j<imgAttribs.length; j++)
  26. {
  27. var imgAttrib = imgAttribs[j];
  28. if (imgAttrib.nodeName == "align" )
  29. {
  30. if (imgAttrib.nodeValue == "left" ) imgStyle = "float:left;" + imgStyle
  31. if (imgAttrib.nodeValue == "right" ) imgStyle = "float:right;" + imgStyle
  32. break
  33. }
  34. }
  35. var strNewHTML = "<span " + imgID + imgClass + imgTitle
  36. strNewHTML += " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
  37. strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
  38. strNewHTML += "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
  39. img.outerHTML = strNewHTML
  40. i = i-1
  41. }
  42. }
  43. }
  44. window.attachEvent("onload", correctPNG);
  45. /* SCRIPT POUR L'HEURE */
  46. Today = new Date;
  47. Heure = Today.getHours();
  48. Min = Today.getMinutes();
  49. Heure = Heure + "h" + Min ;
  50. /* FIN SCRIPT POUR L'HEURE */
  51. </script>
  52. </head>
  53. <!-- ============================================== BODY ================================================================ -->
  54. <body class="nospace">
  55. <!-- ============ ENTETE ============ -->
  56. <div class="entete-gauche"></div>
  57. <div class="entete-droite"> </div>
  58. <div class="entete">
  59.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="600" height="140">
  60.         <param name="movie" value="bandeau-seche.swf">
  61.         <param name="quality" value="high">
  62.         <embed src="bandeau-seche.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="600" height="140"></embed>
  63.       </object>
  64. </div>
  65. <!-- ============ BANDE INFORMATION ============ -->
  66. <div class="bande-info">
  67.   <div align="center"><img src="barre-info.png"></div>
  68. </div>
  69. <div class="image-haut-gauche"><img src="images/hg-sous-logo.jpg"></div>
  70. <div class="cadran-heure"><img src="images/cadran-heure.png"></div>
  71. <!-- ============ MENU GAUCHE ============ -->
  72. <div class="bande-menu-gauche"></div>
  73. <div class="sous-menu-gauche"></div>
  74. <div class="bouton-annuaire">
  75.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="140" height="30">
  76.         <param name="movie" value="bouton-annuaire.swf">
  77.         <param name="quality" value="high">
  78.  <param name="wmode" value="transparent" />
  79.         <embed src="bouton-annuaire.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="140" height="30"></embed>
  80.       </object>
  81. </div>
  82. <div class="bouton-transfert">
  83.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="140" height="30">
  84.         <param name="movie" value="bouton-transfert.swf">
  85.         <param name="quality" value="high">
  86.  <param name="wmode" value="transparent" />
  87.         <embed src="bouton-transfert.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="140" height="30"></embed>
  88.       </object>
  89. </div>
  90. <div class="bouton-meteo">
  91.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="140" height="30">
  92.         <param name="movie" value="bouton-meteo.swf">
  93.         <param name="quality" value="high">
  94.  <param name="wmode" value="transparent" />
  95.         <embed src="bouton-meteo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="140" height="30"></embed>
  96.       </object>
  97. </div>
  98. <div class="bouton-aides">
  99.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="140" height="30">
  100.         <param name="movie" value="bouton-aides.swf">
  101.         <param name="quality" value="high">
  102.  <param name="wmode" value="transparent" />
  103.         <embed src="bouton-aides.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="140" height="30"></embed>
  104.       </object>
  105. </div>
  106. <div class="bouton-infos">
  107.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="140" height="30">
  108.         <param name="movie" value="bouton-infos.swf">
  109.         <param name="quality" value="high">
  110.  <param name="wmode" value="transparent" />
  111.         <embed src="bouton-infos.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="140" height="30"></embed>
  112.       </object>
  113. </div>
  114. <div class="bouton-outils">
  115.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="140" height="30">
  116.         <param name="movie" value="bouton-outils.swf">
  117.         <param name="quality" value="high">
  118.  <param name="wmode" value="transparent" />
  119.         <embed src="bouton-outils.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="140" height="30"></embed>
  120.       </object>
  121. </div>
  122. <!-- ============ MENU DROITE ============ -->
  123. <div class="bande-menu-droite"></div>
  124. <div class="sous-menu-droite"></div>
  125. <div class="sous-menu-droite2"></div>
  126. <!-- ============ CADRANS CENTRE ============ -->
  127. <div class="fond-centre-titre">
  128. <div align="center">Transfert de fichiers</div>
  129. </div>
  130. <div class="fond-centre"></div>
  131. <div class="cadran-centre1"><table width="100%" height="60px"border="0" cellspacing="0" cellpadding="0">
  132.   <tr>
  133.     <td width="2%">&nbsp;</td>
  134.     <td width="68%"><input type="file" name="file" size="29"></td>
  135.     <td width="30%"><input type="submit" name="upload" value="Transférer le fichier"></td>
  136.   </tr>
  137.     <tr>
  138.       <td>&nbsp;</td>
  139.       <td><input type="text" name="textfield" size="29">
  140.         <input type="submit" name="dossier" value="Cr&eacute;er un dossier"></td>
  141.       <td>&nbsp;</td>
  142.     </tr>
  143. </table>
  144. </div>
  145. <!-- =========================================== CODE ASP QUI AFFICHE LA LISTE DES FICHIERS D'UN DOSSIER ============================= -->
  146. <div class="cadran-listing">
  147. <% response.expires = "-1" %>
  148. <%
  149. Dim dossier, chemin, dossierParent , intFich, intRep
  150. Set objFs = Server.CreateObject("Scripting.FileSystemObject" ) 
  151. 'Nous créons ici une instance du composant FileSystemObject sur le serveur.
  152. dossier = Request.QueryString("dossier" )
  153. 'La variable dossier contient le chemin du répertoire virtuel à parcourir;
  154. 'sa valeur par défaut est la racine de votre “home directory” ou répertoire de base. 
  155. chemin = Server.MapPath(dossier&"/" )
  156. 'Nous utilisons la méthode MapPath de l’objet Server qui permet de retrouver le chemin réel
  157. 'correspondant au répertoire virtuel.
  158. set objDossier = objFs.getFolder(chemin) %>
  159. <!--Ici nous créons un objet Folder qui possède des propriétés de manipulation des répertoires.-->
  160. <%if dossier <> "" Then
  161. dossierParent = Left(dossier, inStrRev(dossier, "/" )-1) %>
  162. <% end if %>
  163. <!--On affiche un lien vers le répertoire parent uniquement si on ne se trouve pas à la racine.
  164. Mais auparavant, il nous faut supprimer la partie de la chaîne qui correspond au dernier répertoire. -->
  165. <!-- REPERTOIRE PARENT -->
  166. <a href="transfert.asp?dossier=<%=dossierParent%>" style="text-decoration : none"><img src="up.gif" border="0">&nbsp;&nbsp;Dossier Parent</a>
  167. <p>
  168. <table border="0" cellspacing="0" width="100%">
  169.   <tr>
  170.     <td width="25%" align="left"><p align="left"><strong><font face="Arial">Dossiers</font></strong></td>
  171. <!-- AFFICHAGE DU NOM DU DOSSIER ACTUELLEMENT PARCOURU AVEC ATTRIBUT COULEUR TAILLE ETC -->
  172. <td width="60%" align="left"><strong><font face="Arial">Actuellement  :  </font></strong><b><font color="##006F00" size="5"><%=objDossier.Name %></font></b></td>
  173. </tr>
  174. </table><hr>
  175. <table width="100%"  border="0" cellspacing="0" cellpadding="0">
  176.   <tr>
  177.     <td width="14"></td>
  178.     <td width="1003"><% intRep=0
  179.   for each sousDossier in objDossier.SubFolders
  180.   intRep=intRep+1
  181.  %>
  182.   <a href="transfert.asp?dossier=<%=dossier&"/"&sousDossier.Name%>" style="text-decoration : none">
  183.   <img src="rep.gif" border="0">&nbsp;&nbsp;<%=SousDossier.Name%></a>
  184.   <br>
  185.  <% next %>
  186. </td>
  187.   </tr>
  188. </table>
  189. <br>
  190. <!--Nous parcourons la collection des sous-répertoires avec une boucle For…Next
  191. en utilisant la propriété SubFolders. Nous créons un lien vers chaque sous-répertoire
  192. en ajoutant leur nom au chemin virtuel contenu dans la variable dossier. -->
  193. <p>
  194. <table border="0" cellspacing="0" width="100%">
  195.   <tr>
  196.     <td width="25%" align="left"><p align="left"><strong><font face="Arial">Fichiers</font></strong></td>
  197.     <td width="15%" align="left" size="2"><strong><font face="Arial">Taille</font></strong></td>
  198.     <td width="25%" align="left" size="2"><strong><font face="Arial">Type</font></strong></td>
  199.     <td width="20%" align="left" size="2"><strong><font face="Arial">Date</font></strong></td>
  200. </tr>
  201. </table><hr>
  202. <% intFich=0
  203.  For each Fichier in objDossier.Files 
  204.  intFich= intFich+1
  205. %>
  206. <table border="0" cellspacing="0" width="100%">
  207.   <tr>
  208.     <td width="25%" align="left"><a href="<%=dossier&"/"&Fichier.Name%>">
  209.         <%=Fichier.Name%></a> </td>
  210.     <td width="15%" align="left" size="2"><font face="Arial"><%= formatnumber(Fichier.Size/1024,2) & " Ko" %></font></td>
  211.     <td width="25%" align="left" size="2"><font face="Arial"><%=Fichier.Type%></font></td>
  212.     <td width="20%" align="left" size="2"><font face="Arial"><%= Fichier.dateLastModified%></font><br></td>
  213. </tr>
  214. </table>
  215. <% next
  216. Set objFs = Nothing
  217. Set objDossier = Nothing %>
  218. <hr><center> Il y a <%=intRep%> Dossier(s) et <%=intFich%> Fichier(s)</center>
  219. <!-- =========================================== CODE ASP QUI AFFICHE LA LISTE DES FICHIERS D'UN DOSSIER ============================= -->
  220. </div>
  221. <!-- Fin CADRAN-LISTING -->
  222. <!-- ============ PIED ============ -->
  223. <div class="pied">
  224. <div align="center"><img src="images/barre-pied.png"></div>
  225. </div>
  226.  
  227.   <div class="heure">
  228. <div align="center">
  229.  <SCRIPT LANGUAGE="JavaScript">document.write(Heure);</SCRIPT>
  230. </div>
  231. </div>
  232.  
  233.  
  234.  
  235.  
  236. </body>
  237. </html>


 
et voila ma page css :
 

Code :
  1. .nospace {width:100%;margin: 0px; background:#598DC6}
  2. /* ============================================ ENTETE ============================================== */
  3. /* OK pour la position */
  4. .entete {
  5. z-index:200;
  6. position:absolute;
  7. width:100%;
  8. height:140px;
  9. background-image: url(bande.jpg);
  10. }
  11. /* OK pour la position */
  12. .entete-gauche {
  13. z-index:250;
  14. position:absolute;
  15. width:600px;
  16. height:140px;
  17. background-color:#193157;
  18. }
  19. /* OK pour la position */
  20. .entete-droite {
  21. z-index:250;
  22. position:absolute;
  23. top:0px;
  24. right:0px;
  25. width:140px;
  26. height:140px;
  27. color:#FFFFFF;
  28. text-align:center;
  29. font: bold 16px/140px Asenine;
  30. background-image: url(bande.jpg);
  31. }
  32. /* ============================================ BANDE INFO ============================================== */
  33. .bande-info {
  34. z-index:50;
  35. position:absolute;
  36. top:140px;
  37. width:100%;
  38. height:40px;
  39. }
  40. .image-haut-gauche {
  41. z-index:150;
  42. position:absolute;
  43. height:20px;
  44. width:170px;
  45. top:140px;
  46. }
  47. .cadran-heure {
  48. z-index:250;
  49. position:absolute;
  50. height:23px;
  51. width:94px;
  52. left:38px;
  53. top:170px;
  54. }
  55. /* ============================================ MENU GAUCHE ============================================== */
  56. /* OK pour la position */
  57. .bande-menu-gauche {
  58. z-index:100;
  59. position:absolute;
  60. height:100%;
  61. width:170px;
  62. background-image: url("trame-verticale-gauche.jpg" );
  63. background-repeat: repeat-y;
  64. }
  65. .sous-menu-gauche {
  66. z-index:150;
  67. position:absolute;
  68. height:300px;
  69. width:150px;
  70. top:180px;
  71. left:10px;
  72. background-color: #5478AF;
  73. border: 1px solid #FFFFFF;
  74. }
  75. .bouton-annuaire {
  76. z-index:200;
  77. position:absolute;
  78. height:30px;
  79. width:140px;
  80. top:210px;
  81. left:15px;
  82. }
  83. .bouton-transfert {
  84. z-index:200;
  85. position:absolute;
  86. height:30px;
  87. width:140px;
  88. top:250px;
  89. left:15px;
  90. }
  91. .bouton-meteo {
  92. z-index:200;
  93. position:absolute;
  94. height:30px;
  95. width:140px;
  96. top:290px;
  97. left:15px;
  98. }
  99. .bouton-outils {
  100. z-index:200;
  101. position:absolute;
  102. height:30px;
  103. width:140px;
  104. top:330px;
  105. left:15px;
  106. }
  107. .bouton-aides {
  108. z-index:200;
  109. position:absolute;
  110. height:30px;
  111. width:140px;
  112. top:370px;
  113. left:15px;
  114. }
  115. .bouton-infos{
  116. z-index:200;
  117. position:absolute;
  118. height:30px;
  119. width:140px;
  120. top:410px;
  121. left:15px;
  122. }
  123. /* ============================================ MENU DROITE ============================================== */
  124. .bande-menu-droite {
  125. z-index:100;
  126. position:absolute;
  127. height:100%;
  128. width:170px;
  129. right:0px;
  130. background-image: url("trame-verticale-droite.jpg" );
  131. background-repeat: repeat-y;
  132. }
  133. .sous-menu-droite {
  134. z-index:150;
  135. position:absolute;
  136. height:210px;
  137. width:150px;
  138. top:180px;
  139. right:10px;
  140. background-color: #5478AF;
  141. border: 1px solid #FFFFFF;
  142. }
  143. .sous-menu-droite2 {
  144. z-index:150;
  145. position:absolute;
  146. height:150px;
  147. width:150px;
  148. top:415px;
  149. right:10px;
  150. background-color: #5478AF;
  151. border: 1px solid #FFFFFF;
  152. }
  153. /* ============================================ CADRAN CENTRE ============================================== */
  154. .fond-centre {
  155. z-index:40;
  156. position:absolute;
  157. top:200px;
  158. left:20%;
  159. height:100%;
  160. width:60%;
  161. background-image: url(trame.jpg);
  162. border: 1px solid #FFFFFF;
  163. }
  164. /* Cadran qui contient le titre, titre centré verticalement en fonction de la hauteur de cellule */
  165. .fond-centre-titre {
  166. z-index:50;
  167. position:absolute;
  168. left:20%;
  169. top:200px;
  170. color:#ffffff;
  171. font: bold 20px/30px Asenine;
  172. height:30px;
  173. letter-spacing:4px;
  174. width:60%;
  175. background-image: url(trame2.jpg);
  176. border: 1px solid #ffffff;
  177. }
  178. /* Cadran pour uploader ou créer un dossier */
  179. .cadran-centre1 {
  180. z-index:50;
  181. position:absolute;
  182. top:245px;
  183. left:22.5%;
  184. height:60px;
  185. width:55%;
  186. font:16px/30px Verdana ;
  187. color:#ffffff;
  188. background-color: #5A89BD;
  189. border: 1px solid #FFFFFF;
  190. }
  191. /* Cadran ou s'afficheront les fichiers contenu dans le dossier UPLOAD */
  192. .cadran-listing {
  193. z-index:50;
  194. position:absolute;
  195. padding:10px;
  196. margin-bottom:20px;
  197. top:320px;
  198. height:35%;
  199. left:22.5%;
  200. width:53.5%;
  201. background-color: #6599D3;
  202. border: 1px solid #FFFFFF;
  203. }
  204. /* ============================================ PIED ============================================== */
  205. .pied {
  206. z-index:50;
  207. position:relative;
  208. height:40px;
  209. width:100%;
  210. bottom:0px;
  211. }
  212. /* ============================================ HEURE ============================================== */
  213. .heure {
  214. z-index:250;
  215. position:relative;
  216. left:55px;
  217. top:132px;
  218. height:20px;
  219. width:60px;
  220. font:bold 18px Asenine;
  221. letter-spacing:1px;
  222. color:#FFFFFF;
  223. }


 
Bonne chance :p le principal, je pense qu'il faut regardé dans la css (peu etre)  
 
merci ++

Reply

Marsh Posté le 10-06-2005 à 16:38:14    

JE VEUX LA PAGE HTML UNE FOIS Générée

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed