title: How to set left element to use the remainder of it's parent's width when right element has variable width?
body: <p>I am working on a navigation bar that has a right section with contents that will vary in width and then I want the left section to take the remainder of the space. I found <code>display: inline-block;</code> sets the element width based on it's content, but I cannot get the left section to take the remainder of the space.</p>
  
  <p>I found another question that shows how to do what I want if the right section was the remainder (<a href="https://stackoverflow.com/questions/20432533/set-width-to-remainder-of-parent-dynamic-width">Set width to remainder of parent - dynamic width</a>) and tried to figure out how to use that concept the other way round, but the right section ends up going onto a second line.</p>
  
  <p>Ultimately I am trying to do this with polymer core-toolbars, but I cannot even get this to work with a very simple example.</p>
  
  <p>html:</p>
  
  <pre><code>&lt;div id="container"&gt;
    &lt;div id="left"&gt;main&lt;/div&gt;
    &lt;div id="right"&gt;variable width content&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>css (using linked example):</p>
  
  <pre><code>#container {
    width: 100%;
    height: 32px;   
  }
  #left {
    overflow: hidden;
    height: 100%;
    background-color: blue;
  }
  #right {
    float: right;
    max-width: 25%;
    height: 100%;
    background-color: grey;
  }
  </code></pre>
  
  <p>css (using inline-block):</p>
  
  <pre><code>#container div{
    position: absolute;
    top: 0px;
    height: 32px;   
  }
  #left {
    left: 0px;
    background-color: blue;
  }
  #right {
    right: 0px;
    display: inline-block;
    background-color: grey;
  }
  </code></pre>
  
  <p><a href="http://jsfiddle.net/blade1981m/002a96rx/" rel="nofollow noreferrer">Linked example fiddle</a></p>
  
  <p><a href="http://jsfiddle.net/blade1981m/8wqxu3uq/" rel="nofollow noreferrer">Inline-block fiddle</a></p>
  
  <p>I am not tied to using either of these methods, this is just what I have been trying after reading several posts. </p>