Jump to content

Report

  • Similar Content

    • By manut
      Даже стыдно спрашивать, но никак не могу понять. Такой вот тривиальный пример.


      <div class="main">
      <div class="block"></div>
      </div>



      body {
      margin: 0;
      padding: 0;
      }
      .main{
      width: 400px;
      height: 400px;
      background-color: #272822;
      }
      .block{
      background-color: #982722;
      width: 100px;
      height: 100px;
      margin: 40px;
      }

      почему в данном случае margin-left отображается корректно, а margin-top как бы вылазит и отодвигает родительский блок от области просмотра?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy