title: How to use CSS position(relative, absolute) with percentage (height, width) dimension?
body: <p>So many question &amp; answers are there related to this topic but no where i found the like following mentioned case. All describes <strong>If you want to  set the height and width in percentage, set the parent height in percentage first</strong> but still I did not get clarity. </p>
  
  <p>For example: Following ID and class of block of drupal 7, and my code which starts from the "box1" which I added using body(Editor) of that block.</p>
  
  <pre><code>&lt;div id="block-block-1"&gt;
      &lt;div class="block-inner"&gt;
          &lt;div class="block-content"&gt;
              &lt;div class="box1"&gt;
                  &lt;a class="box2"&gt;
                      &lt;span class="box3"&gt;For Title&lt;/span&gt;
                      &lt;span class="box4"&gt;For Text&lt;/span&gt;
                      &lt;span class="box5"&gt;For Image&lt;/span&gt;
                  &lt;/a&gt;
             &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>**So, for which part of code is parent for which one.</p>
  
  <ol>
  <li><p><strong>Height &amp; width Aspect:</strong> Do I have to make the #block-block-1 {height: 100%, width: 100%}, and it will be apply to every one. Or do I have to add at each stage, but if I do that, then automatically all <code>div</code>, <code>a</code> sections will be 100%, that not make any sense.</p></li>
  <li><p><strong>Position Aspect:</strong> Now The other aspect of positioning of <code>Div</code> with combination of <code>Position:relative</code> and <code>Position:absolute</code>, where, it states that parent <code>div</code> should be relative and inside that all div should be absolute and set its position using <code>top</code>, <code>right</code> and <code>left</code>. But same question one's Relative position is other's absolute position, so again it creates contradictory same as height and width.</p></li>
  </ol>
  
  <p>So, what is the right way to use this height/weight(in percent) and position aspect simultaneously? </p>