bluemoon
Neues Mitglied
so...folgendes Problem:
Ich hab 2 div container, 1 mit der Navigation und ! mit dem Inhalt.
Jetzt will ich dass die nebeneinander angezeigt werden und zwar möglichst ohne position:absolute oder Tabellen.
Ich habs mit float:left probiert aber des funktioniert irgendwie nicht^^
auch nicht wenn ich beim einen float:left und beim anderen float:right eingeb.
Und der rechte div sollte auch noch in der Höhe sich dem Inhalt anpassen
hier ist mal der code:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<meta name="generator" content="Adobe GoLive 5">
<link rel="stylesheet" type="text/css" href="style.css">
<title></title>
</head>
<body>
<div id="header" margin-top="13px" margin-left="13px">
</div>
<div id="navi">
<table id="links" width="100" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="td"><a href="">Home</a></td>
</tr>
<tr>
<td class="td"><a href="">Über uns</a></td>
</tr>
<tr>
<td class="td"><a href="">Fotos</a></td>
</tr>
<tr>
<td class="td"><a href="">Gästebuch</a></td>
</tr>
<tr>
<td class="td"><a href="">Forum</a></td>
</tr>
</table>
</div>
<div id="content" width="400px">
Lorem ipsum dolor sit amet, consectetuer adipiscing e Lorem ipsum dolor sit amet, consectetuer adipiscing e Lorem ipsum dolor sit amet, consectetuer adipiscing e Lorem ipsum dolor sit amet, consectetuer adipiscing e
</div>
</body>
</html>
und der von der css-datei:
body {
background-color:#F4A460;
color: #000000;
}
#header {
width: 800px;
height: 100px;
background-color: #BDB76B;
}
#navi {
float: left;
margin-top: 13px;
width: 100px;
}
#links {
width: 90px;
border-collapse:collapse;
}
#links a {
display: block;
background: #D2691E;
color: #000000;
font: bold 11px Verdana,Arial;
margin: 0px auto;
padding: 4px 2px;
text-decoration: none;
width: 90px;
}
#links a:hover {
background-color: CD853F;
color: #000000;
}
.td {
border:1px solid #000000;
background-color:#D2691E;
width:90px;
text-align: center;
}
#content {
float: left;
}
Beim rechten div setzt er irgendwie auch keinen Background oder border um..
Ich hoff ich hab mich einigermaßen verständlich ausgedrückt xD
lg bluemoon
Ich hab 2 div container, 1 mit der Navigation und ! mit dem Inhalt.
Jetzt will ich dass die nebeneinander angezeigt werden und zwar möglichst ohne position:absolute oder Tabellen.
Ich habs mit float:left probiert aber des funktioniert irgendwie nicht^^
auch nicht wenn ich beim einen float:left und beim anderen float:right eingeb.
Und der rechte div sollte auch noch in der Höhe sich dem Inhalt anpassen
hier ist mal der code:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<meta name="generator" content="Adobe GoLive 5">
<link rel="stylesheet" type="text/css" href="style.css">
<title></title>
</head>
<body>
<div id="header" margin-top="13px" margin-left="13px">
</div>
<div id="navi">
<table id="links" width="100" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="td"><a href="">Home</a></td>
</tr>
<tr>
<td class="td"><a href="">Über uns</a></td>
</tr>
<tr>
<td class="td"><a href="">Fotos</a></td>
</tr>
<tr>
<td class="td"><a href="">Gästebuch</a></td>
</tr>
<tr>
<td class="td"><a href="">Forum</a></td>
</tr>
</table>
</div>
<div id="content" width="400px">
Lorem ipsum dolor sit amet, consectetuer adipiscing e Lorem ipsum dolor sit amet, consectetuer adipiscing e Lorem ipsum dolor sit amet, consectetuer adipiscing e Lorem ipsum dolor sit amet, consectetuer adipiscing e
</div>
</body>
</html>
und der von der css-datei:
body {
background-color:#F4A460;
color: #000000;
}
#header {
width: 800px;
height: 100px;
background-color: #BDB76B;
}
#navi {
float: left;
margin-top: 13px;
width: 100px;
}
#links {
width: 90px;
border-collapse:collapse;
}
#links a {
display: block;
background: #D2691E;
color: #000000;
font: bold 11px Verdana,Arial;
margin: 0px auto;
padding: 4px 2px;
text-decoration: none;
width: 90px;
}
#links a:hover {
background-color: CD853F;
color: #000000;
}
.td {
border:1px solid #000000;
background-color:#D2691E;
width:90px;
text-align: center;
}
#content {
float: left;
}
Beim rechten div setzt er irgendwie auch keinen Background oder border um..
Ich hoff ich hab mich einigermaßen verständlich ausgedrückt xD
lg bluemoon
Zuletzt bearbeitet: