Ich bin Anfänger mit CSS und möchte gerne erfahren warum hier in meinem Testprojekt diese Abstände angezeigt werden:
Hier mein HTML-Code:
- Code: Alles auswählen
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>psp energietechnik gmbh</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div id="container">
<div id="bild">
<br>bild</br>
</div> <!-- bild -->
<div id="boxlogoadresse">
<div id="logo">
<br>logo</br>
</div> <!-- logo -->
<div id="adresse">
<br>adresse</br>
</div> <!-- adresse -->
</div> <!-- boxlogoadresse -->
<div id="navi">
<br>navi</br>
</div> <!-- navi -->
<div id="inhalt">
<br>inhalt</br>
</div> <!-- inhalt -->
<div id="footer">
<br>footer</br>
</div> <!-- footer -->
</div> <!-- container -->
</body>
</html>
Und das ist mein CSS-Code:
- Code: Alles auswählen
body {
background-color:#333;
color:#987654;
margin:0px;
padding:0px;
}
#container {
width:1000px;
text-align:left;
margin-left:auto;
margin-right:auto;
padding:0px;
}
#boxlogoadresse {
float:left
}
#logo {
background-color:#FFFFFF;
width:790px;
height:80px;
padding-left:10px;
}
#adresse {
background-color:#EEE;
width:790px;
height:120px;
padding-left:10px;
}
#bild {
background-color:#123456;
float:right;
width:190px;
height:190px;
margin-left:10px;
margin-bottom:10px;
}
#navi {
background-color:#EEE;
float:left;
width:240px;
clear:both;
padding-left:10px;
}
#inhalt {
background-color:#123456;
float:right;
width:730px;
padding-left:10px;
padding-right:10px;
}
#footer {
background-color:#EEE;
clear:both;
padding-left:10px;
}
