CSS为什么margin-top负数无效

问题遇到的现象和发生背景
用代码块功能插入代码,请勿粘贴截图


header("Content-Type: text/html; charset=utf-8");
 ?>



<div class= 'r3243432'>



<div class = 'weeww'>






<div class = 'weeww'><a href='index.php'>贴吧首页a>div>
<a href="index.php"  title="贴吧主页"><img src="/image/tieba_logo_117_38.png"style="  padding: -40px;width:102px; height:32px;margin-left:20px;margin-top:10px;">a>

<form action="search.php" method="post">

<input type="text" name="contexts" style="width:535px; height:40px;    line-height:0px;    margin-left:150px;     margin-top:-110px;" class='hdi'/>
<font color="#FFFFFF";><input type="submit"  name="enter" value="进入贴吧" class="btn-global"style="width:108px;    height:40px;    vertical-align:bottom;margin-left:-10px;"  >font>
<font color="#000000";><input type="submit"  name="search" value="全吧搜索"class = "i-ask-link"style="width:108px; height:40px;margin-top:-40px; vertical-align:bottom;" >font>
form>
<br/>
div>

<br/>

<style>
    
  .r3243432 {

background-color: #fff;
-webkit-box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);

}
.hdi {
    font-size: 16px;
    width: 437px;
    height: 40px;

    border: 2px solid #C4C7CE;

    border-radius: 10px;
    border-bottom-color: #ccc;
    border-radius: 10px 0 0 10px;

    margin-top:-100px;
    text-indent: 16px;
    
    color: #222;

}
.btn-global {
    font-family: Helvetica;

    width: 112px;
    height: 40px;
    line-height: 40px;
    font-size: 15px;
    font-weight: 400;
    border-radius: 0 10px 10px 0;
    color: #fff;
 
    background: #4E6EF2;
  
    
    border: 0;
    cursor:pointer;
}
.i-ask-link {
    width: 112px;
    height: 40px;
    font-size: 15px;
    font-family: Helvetica;
    margin-left: 17px;
    width: 108px;
    height: 36px;
    text-align: center;
    line-height: 36px;
    border: 2px solid #4E6EF2;
    border-radius: 10px;
    background: #FFFFFF;
color:#4E6EF2;
}






style>






你现在设置margin-top的元素父级是form,它本身的文档流就到那里了,现在是有效果的,只是没有100px的空间了,所以只移了不到100px的空间,
你如果想要和最左边对齐,可以给form标签加这个属性
标签上的对齐方式建议你用flex布局,万能