rurtubia
6/1/2015 - 1:48 AM

HTML DIV element

HTML DIV element

<style>
  .injected-text {
    margin-bottom: -25px;
    text-align: center;
  }

  .box {
    border-style: solid;
    border-color: black;
    border-width: 5px;
    text-align: center;
  }

  .yellow-box {
    background-color: yellow;
    padding:10px;
  }
  
  .red-box {
    background-color:red;
    padding: 20px;
    margin: -15px;
  }

  .green-box {
    background-color: green;
    padding: 20px;
    margin: -15px;
  }
</style>

<div class="box yellow-box">
  <h5 class="box red-box">padding</h5>
  <h5 class="box green-box">padding</h5>
</div>
<style>
  .injected-text {
    margin-bottom: -25px;
    text-align: center;
  }

  .box {
    border-style: solid;
    border-color: black;
    border-width: 5px;
    text-align: center;
  }

  .yellow-box {
    background-color: yellow;
    padding:10px;
  }
  
  .red-box {
    background-color:red;
    padding: 20px;
    margin: 20px;
  }

  .green-box {
    background-color: green;
    padding: 20px;
    margin: 10px;
  }
</style>
<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
  <h5 class="box red-box">padding</h5>
  <h5 class="box green-box">padding</h5>
</div>
<style>
  .injected-text {
    margin-bottom: -25px;
    text-align: center;
  }

  .box {
    border-style: solid;
    border-color: black;
    border-width: 5px;
    text-align: center;
  }

  .yellow-box {
    background-color: yellow;
    padding:10px;
  }
  
  .red-box {
    background-color:red;
    padding: 20px;
  }

  .green-box {
    background-color: green;
    padding: 20px;
  }
  
</style>

<h5 class="injected-text">margin</h5>

<div class="box yellow-box">
  <h5 class="box red-box">padding</h5>
  <h5 class="box green-box">padding</h5>
</div>
<style>
  .gray-background {
    background-color: gray;
  }
</style>

<div class="gray-background">
  <p>Text</p>
</div>
  .green-box {
    background-color: green;
    padding-top: 40px;
    padding-left: 40px;
    padding-bottom: 20px;
    padding-right: 20px;
  }
.green-box {
    background-color: green;
    margin-top: 40px;
    margin-left:40px;
    margin-bottom:20px;
    margin-right:20px;
  }
  <!--top, right, bottom, left-->
  .red-box {
    background-color:red;
    padding: 20px 40px 20px 40px;
  }
<!--top, right, bottom, left-->
  .green-box {
    background-color: green;
    margin: 40px 20px 20px 40px;
  }