HTML Element Style How to - Extending the width of a sub-div to 100%


We would like to know how to extending the width of a sub-div to 100%.


<!DOCTYPE html>
<style type='text/css'>
.SubDIV {<!--from ww  w  .  j  ava  2 s.  c  o  m-->
  position: absolute;
  top: 50px;
  background: #EEE;
  width: 100%;

.MainContainerDIV {
  background: #AAA;
  <div class="MainContainerDIV" style="width: 300px; height: 200px;">
    This is the main div
    <div class="SubDIV">
      <p>this is the sub div</p>

The code above is rendered as follows: