Hallo,
füge mal folgendes in den CSS Bereich hinzu:
HTML-Code:*{ margin: 0; padding: 0; }
Hallo,
entweder ist CSS nicht halb so einfach wie alle Tutorials glauben machen oder ich hab ein Brett vorm Kopf!
Warum sind die 4 DIVs nicht direkt untereinander, sondern haben einen Abstand von einander?
Ich habe padding und margin auf 0px gesetzt.
Mit der Breite bin ich zufrieden aber die Blöcke sollen direkt untereinander geklatscht sein.
SvenPHP-Code:<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<style type="text/css" media="screen">
body{
margin: 0;
padding: 0;
font: 85% arial, hevetica, sans-serif;
text-align: center;
color: #000;
background-color: #D6D6D6;
}
#wrapper{
margin: 20px auto;
padding: 0px 0px 0px 0px;
width: 760px;
text-align: left;
background-color: red;
border: 1px solid black;
}
#header{
margin: 0px 20px 0px 20px;
padding: 0px 0px 0px 0px;
background-color: yellow;
}
#separator{
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
background-color: blue;
}
#contents{
margin: 0px 20px 0px 20px;
padding: 0px 0px 0px 0px;
background-color: green;
}
#footer{
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
clear: both;
height: 20px;
background-color: gray;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<p>header</p>
</div>
<div id="separator">
<p>separator</p>
</div>
<div id="contents">
<p>contents</p>
</div>
<div id="footer">
<p>footer</p>
</div>
</div>
</body>
</html>
Hallo,
füge mal folgendes in den CSS Bereich hinzu:
HTML-Code:*{ margin: 0; padding: 0; }
Grüße aus dem Odenwald
Thomas
du hast da noch die "p" tags, welche die ränder verursachen
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)