[RESOLU] Probleme pour augmenter un DIV en fonction d'un autre

Probleme pour augmenter un DIV en fonction d'un autre [RESOLU] - HTML/CSS - Programmation

Marsh Posté le 25-09-2007 à 11:14:10    

Bonjour,  
 
Je suis en train de faire un site en SPIP et j'ai un problème au niveau de ma feuille de style : Je souhaiterai que mon bloc de menu s'allonge automatique jusqu'à mon pied de page.
 
Voilà deux screen-shot pour vous permettre de comprendre mon problème.
http://lousfaiences.free.fr/spip/f [...] r_menu.JPG
http://lousfaiences.free.fr/spip/forum/menu.JPG
 
Je souhaiterai donc que mon bloc #navigation s'allonge et aille toucher systèmatiquement le bloc #pied quelque soit la taille de mon contenu.
 
Voilà mon fichier html :  

Code :
  1. <body class="page_rubrique">
  2. <div id="page">
  3. [(#REM) Entete de la page + titre du site ]
  4. <INCLURE{fond=inc-entete}>
  5. <div id="conteneur">
  6.  [(#REM) Menu de navigation laterale ]
  7.  <div id="navigation">
  8.   [(#REM) Menu de navigation par rubriques ]
  9.   <INCLURE{fond=inc-rubriques}{id_rubrique}>
  10.   [(#REM) Menu de navigation mots-cles ]
  11.   <B_mots>
  12.   <div class="divers">
  13.    <h2 class="menu-titre"><:mots_clefs:></h2>
  14.    <ul>
  15.     <BOUCLE_mots(MOTS) {id_rubrique} {par titre}>
  16.     <li><a href="#URL_MOT" rel="tag">#TITRE</a></li>
  17.     </BOUCLE_mots>
  18.    </ul>
  19.   </div>
  20.   </B_mots>
  21.  </div><!-- fin navigation -->
  22.  [(#REM) Contenu principal : contenu de la rubrique ]
  23.  <div id="contenu">
  24. [(#REM) Fil d'Ariane ]
  25. <div id="hierarchie"><a href="#URL_SITE_SPIP/"><:accueil_site:></a><BOUCLE_ariane(HIERARCHIE){id_rubrique}> &gt; <a href="#URL_RUBRIQUE">[(#TITRE|couper{80})]</a></BOUCLE_ariane>[ &gt; (#TITRE|couper{80})]</div>
  26.   ...
  27.  </div><!-- fin contenu -->
  28. </div><!-- fin conteneur -->
  29. [(#REM) Pied de page ]
  30. <INCLURE{fond=inc-pied}{skel=#SQUELETTE}>
  31. </div><!-- fin page -->
  32. </body>


 
Le fichier inc-rubriques.html :  

Code :
  1. <B_rubriques>
  2. <div class="rubriques">
  3. <!--<h2 class="menu-titre"><:rubriques:></h2>-->
  4. <ul>
  5. <BOUCLE_rubriques(RUBRIQUES) {racine} {par num titre} {tout}>
  6.  <li>
  7.   <img src="#CHEMIN{puce_orange.png}" alt="puce" class="format_png" />  <a href="#URL_RUBRIQUE"[ class="(#EXPOSE)"]>[(#TITRE|couper{80})]</a>
  8.   <B_sous_rubriques>
  9.   <ul>
  10.    <BOUCLE_sous_rubriques(RUBRIQUES) {id_parent} {par num titre, titre}>
  11.     <BOUCLE_test_expose(RUBRIQUES)
  12.      {id_enfant}>#EXPOSE{' '}
  13.     </BOUCLE_test_expose>
  14.     <li><img src="#CHEMIN{puce_bleue.png}" alt="puce" class="format_png" />
  15.      <a href="#URL_RUBRIQUE"[ class="(#EXPOSE)"]>
  16.       [(#TITRE|couper{80})]
  17.      </a>
  18.      <BOUCLE_re(BOUCLE_sous_rubriques)></BOUCLE_re>
  19.     </li>
  20.     </B_test_expose>
  21.    </BOUCLE_sous_rubriques>
  22.   </ul>
  23.   </B_sous_rubriques>
  24.  </li>
  25. </BOUCLE_rubriques>
  26. </ul>
  27. </div>
  28. </B_rubriques>


 
Et ma css :  

Code :
  1. body {
  2. background: #FFF;
  3. margin: 1.5em;
  4. text-align: center;
  5. font-size: 1em;
  6. color: #333;
  7. }
  8. /*  ------------------------------------------
  9. /*  Disposition a l'ecran des blocs principaux
  10. /*  ------------------------------------------ */
  11. #page {
  12. width: 48em;
  13. text-align: left;
  14. margin-left: auto;
  15. margin-right: auto;
  16. }
  17. #conteneur { width: 100%;}
  18. #conteneur #contenu {
  19. float: left;
  20. width: 27em;
  21. margin-left:2em;
  22. }
  23. #conteneur #navigation {
  24. float: left;
  25. width: 10.5em;
  26. text-align: center;
  27. /*min-height:Inherit;*/
  28. background-image:url(fond_menu_degrade.jpg);  
  29. }
  30. /* Entete */
  31. #entete {
  32. width: 100%;  
  33. height:80px;}
  34. #entete #nom_site_spip, #entete a .spip_logos {
  35. display: block;
  36. float: left;
  37. font-weight: bold;
  38. font-size: 1.5em; }
  39. #entete a { text-decoration: none; }
  40. #entete .formulaire_recherche { float: right; }
  41. /* Fil d'Ariane */
  42. #hierarchie {
  43. /*clear: both;*/
  44. margin-bottom: 2em;
  45. left:15em;
  46. font-size: 0.71em;/*0.77em KCA 23/09/07*/
  47. }
  48. /* Pied de page */
  49. #pied {
  50. clear: both;
  51. width: 100%;
  52. /*margin-top: 4em;*/
  53. border-top: 1px dotted #CCC;
  54. /*padding: 2px;*/
  55. text-align: center;
  56. background: #c7d8ec;  
  57. }
  58. #pied small { font-size: 0.77em;}
  59. #pied img { vertical-align: bottom; }
  60. /*  ------------------------------------------
  61. /*  Habillage des menus et de la navigation
  62. /*  ------------------------------------------ */
  63. /*  Habillage general des menus de navigation
  64. ---------------------------------------------- */
  65. .rubriques, .breves, .syndic, .forums, .divers {
  66. min-width: 10em;
  67. border: 0px solid #CCC;
  68. margin-bottom: 0em;
  69. font-size: 0.77em;
  70. }
  71. .menu-titre {
  72. /*padding: 0.2em 0.4em;*/
  73. /*border-bottom: 1px dotted #CCC;*/
  74. text-align: center;
  75. font-weight: bold;
  76. }
  77. #navigation p, .encart p { margin: 0; padding: 0.2em 0.7em; text-align: left;  }
  78. #navigation ul, .encart ul { margin: 0; padding: 0.2em 0; text-align: left; list-style: none; }
  79. #navigation li, .encart li { margin: 0; margin-top: 1em; padding: 0 0.7em; }
  80. /*  Des couleurs specifiques selon les types de menus
  81. ---------------------------------------------- */
  82. .rubriques { /*background: #002f55;*//*EAFFEA KCA 23/09/07 */
  83.   background-image:url(fond_menu_degrade.jpg);
  84.   color:#FFF; /*KCA*/
  85.   }
  86. .rubriques a{color:#FFF;
  87. text-decoration:none;}
  88. .rubriques a:hover{color:#B1540F;
  89. text-decoration:none;}
  90. .rubriques .menu-titre { background: #002f55; } /*F2FFF2 KCA 23/09/07*/
  91. /*  ------------------------------------------
  92. /*  Habillage du contenu
  93. /*  ------------------------------------------ */
  94. /*  Cartouche et titraille
  95. ---------------------------------------------- */
  96. .cartouche { margin-bottom: 2em;}
  97. .cartouche .titre {
  98. font-size: 1.27em;
  99. font-weight: bold;
  100. color: #B1540F; border-bottom: 1px dashed #C7D8EC;}
  101. #contenu .surtitre, #contenu .soustitre { font-size: 0.82em;color: #B1540F; }
  102. .cartouche .spip_logos {
  103. float: right;
  104. margin-left: 16px;
  105. margin-bottom: 16px; }
  106. .cartouche p { margin: 0; padding: 0; clear: left; }
  107. .cartouche small { font-size: 0.71em; }
  108. .cartouche .traductions { font-size: 0.71em; }
  109. .cartouche .traductions * { display: inline; }
  110. .cartouche .traductions li { padding-left: 1em; }
  111. /*  Mise en forme des textes du contenu
  112. ---------------------------------------------- */
  113. .chapo {
  114. margin-bottom: 1.5em;
  115. font-weight: bold;
  116. line-height: 1.4em; }
  117. .lien {
  118. background: #EEE;
  119. margin: 1em;
  120. margin-bottom: 1.5em;
  121. padding: 0.82em;
  122. border: 1px solid #CCC;
  123. font-size: 0.82em;
  124. font-weight: bold; }
  125. .texte { color: #000; font-size: 0.96em; }
  126. .ps, .notes {
  127. margin-top: 1.4em;
  128. padding-top: 2px;
  129. border-top: 2px solid #CCC; }
  130. .ps { font-size: 0.82em; }
  131. .notes { clear: both; font-size: 0.77em; }
  132. .ps h2, .notes h2 { font-size: 1.19em; font-weight: bold; }
  133. /*  Listes de documents joints (a un article ou une rubrique)
  134. ---------------------------------------------- */
  135. #documents_joints {
  136. margin-top: 1.4em;
  137. padding-top: 2px;
  138. border-top: 2px solid #CCC; }
  139. #documents_joints h2 { margin-bottom: 0.4em; font-size: 0.88em; font-weight: bold; }
  140. #documents_joints ul { margin: 0; padding: 0; list-style: none; }
  141. #documents_joints li { margin-bottom: 0.4em; }
  142. #documents_joints li .spip_doc_titre {}
  143. #documents_joints li .spip_doc_titre small { font-weight: normal; }
  144. #documents_joints li .spip_doc_descriptif {}
  145. /* Listes d'articles et extraits introductifs
  146. ----------------------------------------------- */
  147. .liste-articles ul { margin: 0; padding: 0; list-style: none; }
  148. .liste-articles li { margin-bottom: 1em; clear: both; color:#B1540F}
  149. .liste-articles li .titre {
  150. font-size: 1.03em;
  151. font-weight: bold;
  152. color:#B1540F;}
  153. .liste-articles li .spip_logos {
  154. float: right;
  155. margin-left: 16px;
  156. margin-bottom: 16px;
  157. clear: right; }
  158. .liste-articles li p { margin: 0; padding: 0; }
  159. .liste-articles li .enclosures {
  160. float: right;
  161. text-align: right;
  162. max-width: 60%;
  163. margin: 0; }
  164. .liste-articles li small {
  165. display: block;
  166. font-size: 0.71em; }
  167. .liste-articles li .texte {
  168. margin-top: 5px;
  169. margin-bottom: 2em;
  170. border: 1px solid #CCC;
  171. padding: 0.9em;
  172. font-size: 0.82em;
  173. line-height: 1.4em; }
  174. .pagination { font-size: 0.90em; }
  175. /*  ------------------------------------------
  176. /*  Habillage specifique du plan du site
  177. /*  ------------------------------------------ */
  178. .page_plan .cartouche { display: none; }
  179. .page_plan #contenu h2 {
  180. clear: both;
  181. background: #EEE;
  182. border: 1px solid #CCC;
  183. padding: 0.5em;
  184. margin-bottom: 1em;
  185. font-weight: bold;
  186. text-align: center; }
  187. .page_plan #contenu .contre-encart ul {
  188. display: block;
  189. clear: left;
  190. margin-top: 0;
  191. margin-bottom: 1em;
  192. padding-top: 0; }
  193. .page_plan #contenu .contre-encart li {}


 
J'ai essayé plusieurs choses au niveau du bloc #navigation
entre les min-height, height, mettre la valeur en %, je ne vois pas du tout comment je peux faire ça et surtout si c'est possible.
Merci de votre aide
 
Karine :hello:


Message édité par karinou le 25-09-2007 à 14:19:53
Reply

Marsh Posté le 25-09-2007 à 11:14:10   

Reply

Marsh Posté le 25-09-2007 à 14:20:24    

Problème résolu grâce à un tutoriel sur alsacreations :  
http://css.alsacreations.com/Faire [...] me-hauteur

Reply

Sujets relatifs:

Leave a Replay

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