title: Make div children share the parents width
body: <p>Basically I got a div parent that consists of 1+ div child elements (with a button within each one). 
  Now I'd like the buttons to fill the entire width of the parent - but share it.
  That is, if there's one child button it should fill 100% - if there are 2 they should have a width of 50% of the size each etc.</p>
  
  <p>How can I do this?</p>
  
  <p>Edit: As requested - here's the code (although I think the above explanation is better):</p>
  
  <pre><code>.buttons
  {
      background: #f1f1f1;
      border-top: 1px solid #ddd;
      padding: 15px;
      height: 34px;
  }
  
  .submitbutton
  {
      width: inherit;
      background: #C2E5FC; /* Old browsers */
      background: -moz-linear-gradient(top, #C2E5FC 0%, #008BE8 100%); /* FF3.6+ */
      background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#C2E5FC), color-stop(100%,#008BE8)); /* Chrome,Safari4+ */
      background: -webkit-linear-gradient(top, #C2E5FC 0%,#008BE8 100%); /* Chrome10+,Safari5.1+ */
      background: -o-linear-gradient(top, #C2E5FC 0%,#008BE8 100%); /* Opera11.10+ */
      background: -ms-linear-gradient(top, #C2E5FC 0%,#008BE8 100%); /* IE10+ */
      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C2E5FC', endColorstr='#008BE8',GradientType=0 ); /* IE6-9 */
      background: linear-gradient(top, #C2E5FC 0%,#008BE8 100%); /* W3C */
      border: 1px solid #008BE8;
      -webkit-border-radius: 20px;
      -moz-border-radius: 20px;
      border-radius: 20px;
      line-height: 20px;
      font-size: 16px;
      padding: 6px 12px;
      color: #fff;
      text-shadow: -1px -1px #008BE8;
      margin-left: 10px;
      cursor: pointer;
  }
  </code></pre>
  
  <p>The html:</p>
  
  <pre><code>&lt;div class="buttons"&gt;
      &lt;input class="submitbutton" type="submit" value="Register"&gt;
      &lt;input class="submitbutton" type="submit" value="Cancel"&gt;
  &lt;/div&gt;
  </code></pre>