title: How to place two divs side by side where LEFT one is sized to fit and other takes up remaining space?
body: <p>I'm trying to place two div's beside each other with the following criteria:</p>
  
  <ol>
  <li><strong>Both divs must stay on the same line.</strong></li>
  <li><strong>Priority must be given to the left div. As much text as possible should be displayed in the left div up to the point where ellipsis is used in case of overflow.</strong></li>
  <li><strong>The right div's text should be right aligned. In the case of overflow, ellipsis should be used.</strong></li>
  <li><strong>Text is dynamic, so no percentages or fixed widths can be used.</strong></li>
  <li><strong>Only needs to work on <code>webkit</code> based browser, so <code>CSS3</code> solution is preferred.</strong></li>
  </ol>
  
  <p>Here are some sample images of how it would look:</p>
  
  <p><strong>Input</strong></p>
  
  <pre><code>&lt;div class='left'&gt;I should always fit. If not, ellipsis should be used.&lt;/div&gt;&lt;div class='right'&gt;Right align and fit me if space available here.&lt;/div&gt;
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <p><img src="https://i.stack.imgur.com/rJO4E.png" alt="enter image description here"></p>
  
  <p><strong>Input</strong> </p>
  
  <pre><code>&lt;div class='left'&gt;I should always fit. If not, ellipsis should be used. And some more text and more, and more text.&lt;/div&gt;&lt;div class='right'&gt;Right align and fit me if space available here.&lt;/div&gt;
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <p><img src="https://i.stack.imgur.com/ncVWf.png" alt="enter image description here"></p>
  
  <p><strong>Input</strong></p>
  
  <pre><code>&lt;div class='left'&gt;This text is left aligned.&lt;/div&gt;&lt;div class='right'&gt;This text is right aligned.&lt;/div&gt;
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <p><img src="https://i.stack.imgur.com/HxL7Q.png" alt="enter image description here"></p>