title: Force Child to Float Parent Width
body: <p>There are a lot of questions regarding forcing a nested div child to fill the width of its parent container, but my question is how to force a child div with a natural flow width that is larger than its parent container (for example, the child div contains a text node that ends up stretching the child beyond the width of the parent container) to maintain its parents width?</p>
  
  <p>A simple non-dynamic solution is to set a width on the parent, but what if the width is not pre-determined (for responsive reasons)? Is there some tag I can add to the child elements to make sure they wrap their content and force the element to stay within the width of the parent?`</p>
  
  <pre><code>&lt;div class="parent"&gt; //Width is not set
      &lt;div class="child"&gt;Here might be a long string of dynamic text&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I understand that by setting a width on the parent element would fix this issue, but in my case I cannot do that because the element is set to resize its width depending on screen size. So for instance if the user is on a phone and turns from portrait to landscape, the parent element must be able to resize and i'd prefer to not have to use javascript for that.</p>
  
  <p>I should also mention that in my particular situation, the parent element is a float. I'm not sure if that matters or not.</p>