title: Keep text from overflowing outside of DIV
body: <p>I have 2 divs side by side. In each div is another div. i then put my text inside both inner divs. The boxes and text look great in wide screen desktop view, but once you get to 1024 and below, the text starts going outside the divs. </p>
  
  <p>I would like the divs to expand and collapse as needed to contain the text and leave the proper spacing between the border and text. I dont want to use overflow hidden as i need all the text to show.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;style&gt;
  .hometext {
      box-sizing: border-box;
  }
  
  .hometext {
      margin: 0;
  }
  
  /* Create two equal columns that floats next to each other */
  .hometext {
      float: left;
      width: 50%;
      padding: 10px;
      height: 300px; /* Should be removed. Only for demonstration */
  }
  
  .hometextinner {
   border:1px solid #999;
   padding-top:10px;
   padding-left:20px;
   padding-right:20px;
   height:100%;
  }
  
  /* Clear floats after the columns */
  .row:after {
      content: "";
      display: table;
      clear: both;
  }
  
  /* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
  @media (max-width: 600px) {
      .hometext {
          width: 100%;
      }
   .hometextinner {
   border:1px solid #999;
   padding-top:10px;
   padding-left:20px;
   padding-right:20px;
   height:100%;
  }
  }
  &lt;/style&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
  &lt;div class="row"&gt;
    &lt;div class="hometext"&gt;
      &lt;div class="hometextinner"&gt;&lt;h2&gt;Column 1&lt;/h2&gt;
      &lt;p&gt;Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.&lt;/p&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="hometext"&gt;
      &lt;div class="hometextinner"&gt;&lt;h2&gt;Column 2&lt;/h2&gt;
      &lt;p&gt;Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.&lt;/p&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>