URL: https://www.overclockers.at/coding-stuff/css_layout_prob_146198/page_1 - zur Vollversion wechseln!
Hallo Leute,
Ich bin grad dabei eine Layout nur mit CSS zu realisieren und bin dabei auf das folgende Problem gestoßen.
Zu sehen ist das Ganze unter:
Index: http://www.freizeitgeek.net/test
CSS: http://www.freizeitgeek.net/test/css/css.css
Die Navigation ragt über den Nav-Content Container hinaus.
Wenn man den Text im Content Bereich länger macht, passt sich das div entsprechend an.
Es sollte natürlich so sein, dass entweder die Navigation oder der Contentbereich die Höhe des Nav-Content Container bestimmt.
Was muss ich dafür ändern?
*tia*
Christoph
tricky.. damit #navigation und #content einfluss auf die Größe von #navigation-content haben, müssen alle 3 position:relative; haben.. aber dann richtet sich natürlich auch #content unterhalb von #navigation aus... hab jetzt ka Lösung gefunden.
jep, hab mich schon ein bissl mit position: absolute, relative gespielt. alles nicht brauchbar =/
Das Einzige wäre eine Tabelle mit zwei Zellen zu machen und in diesen dann die DIVs ... nur dann ist halt das CSS only Layout beim Teufel. =(
nach deinem content div, also bevor du navigation-content zumachst füg diesen div ein
<div style="clear: both;"> </div>
das problem ist, dass floats ihre größe selbst bestimmen
nice, aber verstehen tu ich das ganze nicht, warum is es mit einem zusätzlichem div mit clear:both; dann so?
Zitat von Spikxnice, aber verstehen tu ich das ganze nicht, warum is es mit einem zusätzlichem div mit clear:both; dann so?
na geh, und da steht net drin warum des funktioniert? damn
ZitatFloats and Height
The drawback to floats is that they tend to auto-size their height. In some cases, floats will stick out of their parent elements. It’s possible to force a parent element to wrap around floats, but getting floats to stretch taller is much harder. There isn’t a reliable way to force a float to be as tall as its parent element (even though height: 100% should work . You can get a parent to wrap around a float by inserting at the end a clear: both element:
<div style="clear: both;"> </div>
ZitatModifying Flow
Despite the obvious value that flow provides, you may wish to prevent content from flowing around a float. You can do this using the clear property and any one of its values, described in Table 6.3.
Table 6.3: Clear Property Values and Their Meanings Value
Description
Left
The top margin of a nonfloated box is increased so that its top border edge is below the bottom margin edge of a left-floated box.
Right
The top margin of the box is increased so that its top border edge is below the bottom margin edge of any right-floated boxes.
Both
The box is moved below all floating boxes.
None
There are no constraints on the box whatsoever.
thx, war aber net negativ gemeint sondern nur allgemeine Frustration darüber
thx ... nice ... werd ich morgen ausprobieren.
hab irgendwie keine emailverständigung bekommen
im mom hab ichs mit einem table gemacht, weil ich was weiterbringen musste ^^
apropos CSS. wenn wer ein eBook dazu hätte wäre ich sehr dankbar wenn er sich bei mir via PM melden würde.
tia. (sry 4 thread missbrauch)
@iCA- : Thx a lot. Funktioniert, is halt irgendwie eine "Pfuschlösung" ... aber so wies aussieht, besteht CSS Formatieren aus pfuschen *g*
Nicht wirklich ein erklärendes EBook aber die CSS-Referenz gibts hier: http://www.w3.org/TR/CSS21/css2.pdf [pdf]
bzw. hier: http://www.w3.org/TR/CSS21/ [html]
@Spikx: Kapitel 9.5 dürfte für dich interessant sein
.
Zitat von gueNicht wirklich ein erklärendes EBook aber die CSS-Referenz gibts hier: http://www.w3.org/TR/CSS21/css2.pdf [pdf]
bzw. hier: http://www.w3.org/TR/CSS21/ [html]
...
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025