title: Specifying exact percentage widths in relation to parent DIV in CSS
body: <p>I am attempting to create a visual element using DIV elements and CSS which should display data in the format demonstrated below.</p>
  
  <p>[-----50%-----|--25%--|--25%--]</p>
  
  <p>When using the code and CSS I've specified below, my final element always spills onto the next line and the CSS percentage values I'm specifying don't seem to create the layout properly.</p>
  
  <p>Could anybody suggest a better way to do this?</p>
  
  <p><strong>My HTML</strong></p>
  
  <pre><code>&lt;div class="visual-indicator-title"&gt;
  All Items&lt;/div&gt;
  &lt;div class="visual-indicator-holder"&gt;
  &lt;div class="vi-internal-element" style="width: 25%; background-color: #5E9BD1;"&gt;
      25%&lt;/div&gt;
  &lt;div class="vi-internal-element" style="width: 25%; background-color: #AB884D;"&gt;
      25%&lt;/div&gt;
  &lt;div class="vi-internal-element" style="width: 50%;"&gt;
      50%&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="visual-legend"&gt;
  &lt;ul class="inline-block"&gt;
      &lt;li&gt;
          &lt;div class="legend-blue"&gt;
          &lt;/div&gt;
          Sales&lt;/li&gt;
      &lt;li&gt;&lt;span class="legend-tan"&gt;&lt;/span&gt;Processed&lt;/li&gt;
      &lt;li&gt;&lt;span class="legend-grey"&gt;&lt;/span&gt;Pending Processing&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>My CSS</strong></p>
  
  <pre><code>.visual-indicator-title{
  font-size:12px;
  font-weight:bold;
  color:#777777;
  }
  .visual-indicator-holder
  {
  width:100%;
  background-color:#666666;
  height:28px;
  border-radius: 8px;
  }
  .visual-indicator-holder .vi-internal-element
  {
  font-size:11px;
  text-align:center;
  color:#ffffff;
  background-color:#777777;
  border-radius: 6px;
  display:inline-block;
  }
  </code></pre>