Antworten auf deine Fragen:
Neues Thema erstellen

Content verschiebt sich nicht?

Hallo Leute,

Wieso verschiebt sich mein Content nicht automatisch unterhalb von nav Tag ??
Hintergrund ist nur so groß wie nav Fläche obwohl ich bei height:100% angegeben habe.
Und es lässt sich weder mit margin-top noch mit top verschieben.


Hier der HTML CODE:
Code:
<body>

<div id="header">
	<div class="wrapper">  <!-- #######################  WRAPPER (Anfang)  #######################   -->
    
    	<nav> <!--   #######################  NAVIGATION / LINKS  (Anfang)    #######################   -->
       		 <ul>
           		 <li><a href="#" class="active">Fachwerkstatt</a></li>
            	 <li><a href="#">Unternehmen</a></li>
            	 <li><a href="#">Reifen & Felgen</a></li>
            	 <li><a href="#">Auto-Checks</a></li>
                 <li><a href="#">Gebrauchtwagen-Verkauf</a></li>
            	 <li><a href="#">Kontakt</a></li>
                 <div style="clear:both;"></div>
        	</ul>
        </nav>  <!--  #######################  NAVIGATION / LINKS  (Ende)   #######################  -->
    
    </div>   <!-- #######################  WRAPPER (Ende)  #######################   -->
    
    
       <div id="content" class="wrapper">
   	
   		<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
 

Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.

The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.

There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
</p>
   
   </div>


</div>  <!-- #######################  BODY (Ende)  #######################   -->


</body>



und hier mein CSS Code
Code:
* {margin:0; padding:0;}

.wrapper {width:960px; margin:auto;}

#header { height:40px; repeat-x top; background:background: rgb(109,179,242); /* Old browsers */

background: -moz-linear-gradient(top,  rgba(109,179,242,1) 0%, rgba(84,163,238,1) 50%, rgba(54,144,240,1) 51%, rgba(30,105,222,1) 100%); /* FF3.6+ */

background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(109,179,242,1)), color-stop(50%,rgba(84,163,238,1)), color-stop(51%,rgba(54,144,240,1)), color-stop(100%,rgba(30,105,222,1))); /* Chrome,Safari4+ */

background: -webkit-linear-gradient(top,  rgba(109,179,242,1) 0%,rgba(84,163,238,1) 50%,rgba(54,144,240,1) 51%,rgba(30,105,222,1) 100%); /* Chrome10+,Safari5.1+ */

background: -o-linear-gradient(top,  rgba(109,179,242,1) 0%,rgba(84,163,238,1) 50%,rgba(54,144,240,1) 51%,rgba(30,105,222,1) 100%); /* Opera 11.10+ */

background: -ms-linear-gradient(top,  rgba(109,179,242,1) 0%,rgba(84,163,238,1) 50%,rgba(54,144,240,1) 51%,rgba(30,105,222,1) 100%); /* IE10+ */

background: linear-gradient(to bottom,  rgba(109,179,242,1) 0%,rgba(84,163,238,1) 50%,rgba(54,144,240,1) 51%,rgba(30,105,222,1) 100%); /* W3C */

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6db3f2', endColorstr='#1e69de',GradientType=0 ); /* IE6-9 */

}




/* ###############  NAVIGATION / LINKS  ############### */

nav {width:960px; height:40px; position:fixed;}

nav ul {list-style:none; position:absolute;}
nav ul li {float:left;}
nav ul li a {padding: 0 20px; text-decoration:none; line-height:40px; height:40px; min-width:30px; font-weight:bold; color:#FFF; display:block; font:Georgia, "Times New Roman", Times, serif; border-right:1px dashed #FFF;}



#content {background:#666; width:960px; top:50px; height:100%;}




Was muss ich in der CSS-Datei eintragen damit sich der unten liegende div Tag sich automatisch unterhalb anordnet ohne dass ich es mit margin-top oder ähnliches nach unten verschieben muss und es sich automatisch nach unten verlängert sobald mehr Inhalt eingetragen wird?




Bitte um Tipps.

Lg
 
Zuletzt bearbeitet:

Duddle

Posting-Frequenz: 14µHz

AW: Content verschiebt sich nicht?

Wieso verschiebt sich mein Content nicht automatisch unterhalb von nav Tag ??
<nav> hat "position: fixed", welches das Element aus dem Dokumentfluss nimmt, es also keinen Platz mehr einnimmt.
Und es lässt sich weder mit margin-top noch mit top verschieben.
Die Angaben "top", "left" usw. funktionieren nur in Kombination mit einer "position"-Angabe, die du für #content nicht hast.


Duddle
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Neueste Themen & Antworten

Flatrate für Tutorials, Assets, Vorlagen

Zurzeit aktive Besucher

Statistik des Forums

Themen
118.565
Beiträge
1.538.067
Mitglieder
67.488
Neuestes Mitglied
Andrew56524
Oben