• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Habe Template mit einem Fehler, aber warum?

Tim Lorens

Mitglied
hallo

ich habe mir ein eigenes kleines template gemacht:

HTML:
<style language="css" type="text/css">
div.alles {
background-color: red;
width: 677px;
height: 400px;
float: center; 
}

div.header {
background-color: red;
width: 677px;
height: 127px;
float: center;
-moz-border-radius:10px;
-khtml-border-radius:0px; }

div.menu {
background-color: brown;
width: 677px;
height: 27px;
float: center; }

div.inhalt {
background-color: blue;
width: 677px;
height: 227px;
float: center; }

div.footer {
background-color: red;
width: 677px;
height: 27px;
float: center;
-moz-border-radius:30px;
-khtml-border-radius:30px; }

div.mama {
color: red;
border-right: 2px solid brown
float: left; 
padding-left: 15px;
}
</style>

<div class="alles">
<div class="header" >
</div>
<div class="menu">
&nbsp;Home | Produkte | Andere
</div>
<div class="inhalt">
<div class="mama"> <!-- ab hier soll die seitenspalte anfangen-->
</div><!-- und hier soll sie aufhören -->
</div>
<div class="footer">
</div>
</div>

Aber die Seitelspalte wird nicht angezeigt,
was soll ich jetzt machen?
 
Code:
div.inhalt {
background-color: blue;
width: 677px;
height: 227px;
[B]float: left;[/B] }



<div class="inhalt"></div>
<div class="mama"></div>
<div style="clear:left;"></div>
 
HTML:
<style language="css" type="text/css">
div.alles {
background-color: red;
width: 677px;
height: 400px;
float: center; 
}

div.header {
background-color: red;
width: 677px;
height: 127px;
float: center;
-moz-border-radius:10px;
-khtml-border-radius:0px; }

div.menu {
background-color: brown;
width: 677px;
height: 27px;
float: center; }

div.inhalt {
background-color: blue;
width: 80%;
height: 227px;
float: left; }

div.footer {
background-color: red;
width: 677px;
height: 27px;
float: center;
-moz-border-radius:30px;
-khtml-border-radius:30px; }

div.mama {
background-color: red;
border-right: 2px solid brown
float: right;
weight: 227px;
widht: 20%;
}
</style>

<div class="alles">
<div class="header" >
</div>
<div class="menu">
&nbsp;Home | Produkte | Andere
</div>
<div class="inhalt">
<div class="mama"> <!-- ab hier soll die seitenspalte anfangen-->
</div><!-- und hier soll sie aufhören -->
</div>
<div class="footer">
</div>
</div>

Habe das jetzt so gemacht und jetzt gehts
Danke!
 
so rum gehts natürlich auch. Aber dein float:center kannst du löschen, das gibts nicht ;)
 
Du musst dein float:right natürlich auch wieder beenden, sonst werden nachfolgende Elemente wie dein Footer falsch dargestellt.

Code:
<div class="inhalt">
<div class="mama"> <!-- ab hier soll die seitenspalte anfangen-->
</div><!-- und hier soll sie aufhören -->
</div>
[B]<div style="clear:right;"></div>[/B]
<div class="footer">
 
Zurück
Oben