<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<style>
html, body, #wrapper, #all {height: 100%; margin: 0;}
#wrapper {width: 800px; margin: 0 auto;}
#main {min-height: 100%; margin-bottom: -100px; background: yellow;}
footer {height: 100px; background: blue;}
#all {padding-bottom: 100px;}
</style>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="wrapper">
<div id="main">
<div id="all">
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
</div>
</div>
<footer>Footer</footer>
</div>
</body>
</html>
Вот код. Объясните, отступы какого элемента создают пространство вверху страницы? Знаю, что если * все обнулить, то будет все ОК. Но хотелось бы понять причину.