title: css for adding background color to div tag
body: <p>I want to add background color to div tag.Now background color appears only in the center  of the div.I want to display it for whole div tag
  I have one outer div box and marked it as 'b'.With in box div tag I have emp div.within emp div I created emp1 div which i want to display background color.
  My problem is I want background color like which i marked in green but now It displayed in center how I drawn in red.
  <img src="https://i.stack.imgur.com/JJJXp.jpg" alt="enter image description here"></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.box{
    height: 400px;
   margin-top:40px;
    text-align: center;
  }  
  .emp,.cli,.doc{
    position:relative;
     
    height:175px;
  
    width: 200px;
   
    border-style: solid;
    border-width: 1px;
    border-color: black;
    padding: 10px 10px 0 10px;
    display: inline-block;
    text-align: left;
    margin-left: 20px;
    margin-right: 20px;
  }
  .emp1,.cli1,.doc1{
   position:relative;
    
   height:20px;
    background: #1e5799;
   text-align:center;
   font-size:13px;
   color:#fff;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;div class="box"&gt;
           &lt;div class="emp"&gt;
              &lt;div class="emp1"&gt;
                  Employees
              &lt;/div&gt;  &lt;!--end of emp1 div --&gt;
           &lt;/div&gt;  &lt;!--end of emp div --&gt; 
           &lt;div class="cli"&gt;
               &lt;div class="cli1"&gt;
                  Clients
              &lt;/div&gt;  &lt;!--end of cli1 div --&gt;
           &lt;/div&gt;  &lt;!--end of cli div --&gt; 
           &lt;div class="doc"&gt;
               &lt;div class="doc1"&gt;
                  Documents
              &lt;/div&gt;  &lt;!--end of doc1 div --&gt;
           &lt;/div&gt;  &lt;!--end of doc div --&gt;  
       &lt;/div&gt; &lt;!--end of box div --&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please run it in full screen.</p>