PDA

Zobacz pełną wersję : zerowa wysokosc diva



docxxx
19-03-2010, 22:48
Dziwna sprawa. Jest sobie prosty kod, ktory jest szkieletem strony (tu wersja okrojona, aby nie zasmiecac):


<div id = "centerwrapper">
<div id = "leftwrapper">
<div id = "leftcontent">
<jdoc:include type="modules" name="leftcontent" style="xhtml" />
</div>
</div>
<div id = "mainwrapper">
<div id = "maincontent">
<jdoc:include type="component" />
</div>
</div>
<div id = "rightwrapper">
<div id = "rightcontent">
<jdoc:include type="modules" name="rightcontent" style="xhtml" />
</div>
</div>
</div>
Nie wiem dlaczego, ale centerwrapper zawsze ma zerowa wysokosc. Atrybut height nie jest przypisany w css, ale nie musi, bo zagnieszczony joomlowy component sam "rozszerza" diva. Co dziwne, div o id maincontent ma juz prawidlowa wysokosc.
Jest mi to potrzebne do nadania tla pod centerwrappera. Obecnie nie mozna tego zrobic. Jedynie maincontent jest prawidlowo "generowany".

zwiastun
20-03-2010, 00:42
A gdy dasz 100%?

docxxx
20-03-2010, 06:38
A gdy dasz 100%?
Probowalem tego i kilku innch innych atrybutow w css. Jedynie, co pomaga to wpisanie pikselu "na sile" w (min-) height.

docxxx
20-03-2010, 07:13
Znalazlem rozwiazanie:
The container div itself has no height, since it only contains floating elements.
Trzeba ustawic:
overflow: auto