WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 25.08.2005, 01:39   #1
Juro
Hero
 
Registriert seit: 24.04.2003
Alter: 53
Beiträge: 823


Standard CSS: div-Höhe übernehmen

Hi,
Ich weiss, daß ein ähnlicher Thread gerade aufgemacht wurde, mein Problem ist aber ein anderes.

Ich habe folgende Seitenstruktur (kommt von einem Mambo-CMS:

Code:
<div id="total">
  <div id="title">
    <?php mosLoadModules( 'top' ); ?>
  </div>
  <div id="left">
    <?php mosLoadModules ( 'left' ); ?>
  </div>
  <div id="main"><?php mosMainBody(); ?></div>
  <div id="bottomline"><?php include_once('includes/footer.php'); ?></div>
</div>
und folgendes CSS:
Code:
div#total {
  position:	        absolute;
  top:              50px;
  left:             50px;
  background-color: #edd185;
}  

div#title {
    width:	900px;
    height:	123px;
    background-image: url('../images/header.jpg');
    z-index: 1;
}

div#main {
  position          :	absolute;
  top               : 138px;
  left              : 245px;
  width             :	655px;
  background-color  : #edd185;
  z-index           : 1;
}

div#left {
	position          :	absolute;
	top               : 138px;
	left              :   0px;
	width             :	230px;
	height            : 100%;
	background-color  : #edd185;
}

div#bottomline {
	position          : relative;
	left              : 245px;
	width             :	655px;
	height            : 142px;
  background-color  : #edd185;
  text-align        : center;
  padding           :  10px;
  z-index           : 2;
}
Jetzt würde ich gerne die Höhe des div#left an die des div#main Elementes anpasst. Meine Überlegung ist folgende:

Wenn sich div#main an den Inhalt anpasst und größer wird, so muss auch das Eltern-Element div#total größer werden (automatisch). Jetzt muss ich div+left nur noch "sagen", daß es die komplette Höhe des div#total Elementes verwenden soll. Das dachte ich mache ich mit "height=100%", nur leider geht das nicht.

Geht das überhaupt?

lg
juro
____________________________________
Software is like sex, it\'s better when it\'s free!
Juro ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 09:33 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag