Probleme mit CSS Layout
Verfasst: 30.03.2006 22:43
Moin,
da ich mal eine Seite erstellen wollte ohne Tabellen, habe ich versucht mein Layout ganz auf divs aufzubauen. Nur habe ich schon ein Problem.
Wenn ich etwas in die linke Spalte schreibe, dann wir die Box für das Content nach unten gerückt. Wie kann ich das ändern? (Habt Gnade mit mir! Ich bin mit divs noch nicht so wirklich vertraut
)
[ externes Bild ]
Aktueller Quelltext:
da ich mal eine Seite erstellen wollte ohne Tabellen, habe ich versucht mein Layout ganz auf divs aufzubauen. Nur habe ich schon ein Problem.
Wenn ich etwas in die linke Spalte schreibe, dann wir die Box für das Content nach unten gerückt. Wie kann ich das ändern? (Habt Gnade mit mir! Ich bin mit divs noch nicht so wirklich vertraut

[ externes Bild ]
Aktueller Quelltext:
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Testseite</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<center>
<div id="frame">
<div id="logo"><br /><br /><center><h2>... Logo ...</h2></center></div>
<div id="welcome"><div class="welcome_text">Willkommen</div></div>
<div id="menuleft">
<div class="menuliste">
<ul>
<li>Home</li>
<li>Kontakt</li>
<li>Links</li>
<hr class="menu">
<li>Forum</li>
</ul>
</div>
</div>
<div id="content">
<div class="content_text">
(hier steht der lange text)
</div></div>
<div id="footer"><div class="copyright">
© Nilz
</div></div>
</div>
</center>
</body>
</html>
Code: Alles auswählen
/* ------------------ Basic Settings ------------------ */
body
{
background-color: #EFEFEF;
}
/* ------------------ Layout Settings ------------------ */
#frame
{
background-color: #B1B1B1;
padding: 0px;
margin-top: 50px;
width: 750px;
height: auto;
border: 0px dashed black;
}
#logo
{
background-image: url('images/logo.gif');
width: 750px;
height: 100px;
border-left: 1px solid black;
border-right: 1px solid black;
border-top: 1px solid black;
}
#welcome
{
background-image: url('images/background.gif');
width: 750px;
height: 25px;
margin-left: 0px;
border: 1px solid black;
}
#menuleft
{
background-color: #F7F7F7;
width: 150px;
height: 150px;
float: left;
border: 1px solid black;
border-right: 1px dashed black;
border-top: 0px solid black;
border-bottom: 0px dashed black;
min-height: 200px;
}
#content
{
background-color: #F7F7F7;
width: 600px;
height: auto;
margin-left: 150px;
border-right: 1px solid black;
min-height: 200px;
}
#footer
{
background-image: url('images/background.gif');
width: 750px;
height: 15px;
margin-left: 0px;
border: 1px solid black;
}
div
{
font-family: Verdana;
font-size: 11px;
}
/* ------------------ Schrift Settings ------------------ */
.welcome_text
{
padding-top: 5px;
text-align: center;
font-weight: bold;
}
.copyright
{
text-align: center;
font-weight: bold;
}
.menuliste
{
padding: 10px;
text-align: left;
}
.content_text
{
padding: 10px;
text-align: left;
}
hr.menu
{
width: 60px;
color: silver;
height: 1px;
margin-left: 0px;
}