Fala rapaziada beleza?
Sou iniciante na área de CSS e estou com um pequeno probleminha. Tenho uma DIV(A) e uma DIV(B ), que está dentro da DIV(A). Quando vou alterar omargin-top da DIV(B ) e aperto f12 para visualizar no browser o margin-top foi acionado na DIV(A) e não na DIV(B ). Gostaria que caso alguém saiba solucionar esse problema me ajudar ai. Vou postar os códigos que estou utilizando. Forte abraço!
painel.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Painel de administração</title>
<link rel="stylesheet" type="text/css" href="estilo.css">
</head>
<body>
<div id="topo_painel">
<div id="topo_titulo">Painel do <strong>admin</strong></div>
</div><!-- DIV TOPO PAINEL !-->
</body>
</html>
estilo.css
@charset "utf-8";
/* CSS Document */
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
body {margin:0px 0px;}
#caixa_logar {width:500px; height:250px; margin:0px auto; margin-top:100px;}
#logo {width:122px; height:55px; margin:0px auto;}
form {width:200px; height:150px; margin:0px auto; margin-top:21px;}
.login {width:182px; height:41px; margin:0px auto; margin-top:6px; color:#999999; text-align:center; font-family: 'Open Sans', sans-serif;}
.botao {width:66px; height:27px; font-family: 'Open Sans', sans-serif; float:right; margin-right:16px; margin-top:6px; background-color:#FFF; border:none; color:#FF4D4D;}
.botao:hover {width:66px; height:27px; font-family: 'Open Sans', sans-serif; float:right; margin-right:16px; margin-top:6px; background-color:#F0F0F0; border:none; color:#FF4D4D; cursor:pointer; -webkit-transition: background 500ms; transition: background 500ms;}
#topo_painel {width:100%; height:50px; background-color:#FF4D4D;}
#topo_titulo {width:300px; height:30px; color:#FFF; font-family: 'Open Sans', sans-serif; font-size:22px; margin-left:200px;}
index.html
<link rel="stylesheet" type="text/css" href="estilo.css">
<title>Login</title><div id="caixa_logar">
<div id="logo"><img src="imagens/logotipo.png" width="122" height="54" /></div>
<form id="logar" name="logar" method="post" action="painel.php">
<input class="login" type = "text" onfocus = " if ( this . value == 'USUÁRIO' ) { this . value = '' } " onblur = " if ( this . value == '' ){ this . value = 'USUÁRIO' } " value="USUÁRIO"><br />
<input class="login" type = "password" onfocus = " if ( this . value == 'Senha' ) { this . value = '' } " onblur = " if ( this . value == '' ){ this . value = 'Senha' } " value="Senha"><br />
<input class="botao" name="" type="submit" value="ENTRAR" />
</form>
</div>