Ik ben bezig met het maken van een layout met HTML en CSS.
Nu wil ik dat mijn site boven vast zit zeg maar. Dus geen vrije ruimte.
Dit werkt goed tot ik mijn header wil toevoegen.
De header wil ik 5px lager laten beginnen.
Als ik bij de header margin-top: 5px; doe dan komt de hele website omlaag en niet bij de header.

[code]
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">;
<html>
<head>
<title>Test</title>
<link rel="stylesheet" type="text/css" href="stijl.css" />
</head>
<body>
<div id="wrapper">
<div id="header">
Hallo
</div>
</div>
<div id="footer">
Test
</div>
</body>
</html>


CSS

* { padding: 0; margin: 0; }

body {
background-image: url(images/layout/bg.jpg);
font-family: Century Gothic, Arial, Helvetica;
font-size: 12px;
color: #000000;
}

#wrapper {
margin: 0 auto;
width: 900px;
height: 600px;
background: #FFF;
border: 1px solid #000;
border-top: none;
}

#header {
width: 890px;
height: 200px;
background: #000;
margin-top: 5px;
margin-left: 5px;
}

Reageren