Hi, could someone answer me, WHY when I set a margin-top to my <div id="logo">
, all the others divs are pushed down. And why if a set float:left to my <div id="logo">
, everything works fine.
Code:
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Olá Mundo!</title>
<style>
/* CSS RESET HERE */ ( http://html5doctor.com/html-5-reset-stylesheet/ )
body { margin:0; }
#container { width:1000px; min-height:100%; height:auto; margin:0 auto; }
#header { width:100%; height:160px; background-color:#FF0; }
#logo { width:150px; height:150px; margin:10px 0 0 10px; background-color:#F0F; }
</style>
</head>
<body>
<div id="container">
<div id="header">
<div id="logo">
<h1>Minha logo!</h1>
<h2>meu slogan ...</h2>
</div>
</div>
</body>
</html>