title: Wrapping text & block elements around images
body: <p>I know it's easy enough to wrap text around images by floating the image right or left &amp; then putting your text after it, but what I am wanting to do is wrap other elements around it as well, such as div's.</p>
  
  <p>I tried to set my div to inline &amp; this worked fine, however once I added other divs inside that div it still <em>looked</em> fine, but when looking at it in Firebug the little blue line that shows the element you are hovering over in the code extended over the image as well &amp; when I attempted to add padding to the container div it didn't work &amp; you could see that was because the padding was added right at the end.</p>
  
  <p>I ended up getting it to look ok but adding padding to the image, however it still doesn't seem the right way to go about it seeing as Firebug doesn't like it &amp; I am worried about compatibility issues.</p>
  
  <p>Here is an image of what I am trying to do.. the gray area is where I want the text/elements to wrap &amp; the brown is the image.</p>
  
  <p><img src="https://i.stack.imgur.com/WGbj2.png" alt="example"></p>
  
  <p>Here is some example code: (This example is the not wrapping version)</p>
  
  <pre><code>&lt;div class="main"&gt;
      &lt;img src="../images/work/example.png" width="275" height="233" class="screenshot" alt="Example" /&gt;
      &lt;div class="details"&gt;
          &lt;div class="about"&gt;
              &lt;div class="title"&gt;
                  About:
              &lt;/div&gt;
              &lt;div class="info"&gt;
                  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.                                
              &lt;/div&gt;
              &lt;!-- Info Ends --&gt;
          &lt;/div&gt;
          &lt;!-- About Ends --&gt;
      &lt;/div&gt;
      &lt;!-- Details Ends --&gt;
      &lt;div class="contentClear"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;!-- Main Ends --&gt;
  </code></pre>
  
  <p>Example CSS:</p>
  
  <pre><code>#content .wrapper .left .main {
      padding-top: 20px;
      width: 550px;
  }
  
  #content .wrapper .left .main .screenshot {
      float: right;
      border: 1px solid #c0c0c0;
      width: 275px;
  }
  
  #content .wrapper .left .main .details {
      width: 263px;
      padding-right: 10px;
  }
  
  #content .wrapper .left .main .details .title {
      color: #0F5688;
      font-size: 1.8em;
      font-family: arial;
      font-weight: bold;
  }
  
  #content .wrapper .left .main .details .info {
      margin-top: 6px;
      font-size: 1.3em;
      font-family: Arial;
      color: #636363;
      line-height: 1.6;
  }
  </code></pre>
  
  <p>Here is an image showing the issue FireBug has with it (from the JSFiddle example), as I say it <em>looks</em> fine on the browser, but seeing as the firebug bar extends all the way over the image I was worried that may cause problems..</p>
  
  <p><img src="https://i.stack.imgur.com/E2yop.png" alt="jsfiddle example"></p>