title: Responsive css divs won't stay next to each other
body: <p>I'm trying to make a responsive web layout. On the front page there is a div, with two divs in it. One for the caption and one for the image. The caption should stay next to the image at all times, but the image and caption should scale for smaller screens.</p>
  
  <p>Here is my html;</p>
  
  <pre><code>&lt;div class="content"&gt;
          &lt;div class="caption"&gt;
          &lt;h1&gt;Blablabla&lt;/h1&gt;
          &lt;p&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac ipsum quam, semper volutpat massa. Cras mattis malesuada sagittis. Cras luctus erat quis orci condimentum quis vulputate lectus venenatis. Proin lorem lorem, vehicula in porta id, facilisis id massa. Phasellus venenatis eros et diam dictum faucibus. Donec at rutrum orci. Vivamus quam sapien, mollis sed aliquet blandit, viverra nec enim. In sapien lectus, fringilla pretium sollicitudin eu, eleifend id mi. Phasellus ullamcorper massa vitae mauris&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="image"&gt;
              &lt;img src="pics02.jpg"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>And this is my css;</p>
  
  <pre><code>    .content {
      margin: 0px auto;
      width:60%;
      background-color:black;
      margin-top:4em;
      display:block;
  }
  
  .caption {
      width:30%;
      background-color:white;
      height: auto;
      display:inline;
      margin:0px;
      color:green;
      float:left;
      padding:6px;
      display:block;
  }
  
  .image {
      display:inline;
      margin:0px;
      float:right;
      display:block;
  }
  
  .image img {
        max-width:100% !important;
      max-height:100% !important;
      display:block;
  }
  </code></pre>
  
  <p>In another topic here on stack I found that I should set the img tag with a max width and height and set the display to block everywhere.
  Unfortunately that doesn't work when I'm scaling, the image gets smaller when you scale but it slides underneath the caption.</p>