title: Floating Too Far Right
body: <p>I've got a record management web application which displays a master record on one screen and AJAXes dynamically built editors into an editor div, which I've used JQuery to make draggable. That works.</p>
  
  <p>Even though the div isn't a window, I thought it might be a nice idea to make it act a bit more like one, so I coded in a "close" button. The structure looks like this:</p>
  
  <pre><code>&lt;div id="editor"&gt;
    &lt;div id="draghandle" /&gt;
    &lt;div id="closebutton" /&gt;
    &lt;div id="editorbody" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Editorbody is variable-dimension depending on what people are trying to enter.</p>
  
  <p>Draghandle's width is set at 100% of editor. Closebutton is set up in CSS as <code>float:right</code>.</p>
  
  <p>My problem is that, in IE6 and IE7, the close button floats too far right. It's always against the right edge of the window, no matter where I drag the editor div around to. In Firefox and Safari it looks like I expected it to - the window is as wide as editorbody and closebutton sits in the top right corner.</p>
  
  <p>I'm not particularly attached to float:right, just looking for a way to set up the CSS that'll give me the same result across all browsers. Any ideas?</p>
  
  <h3>"Screenshots"</h3>
  
  <p>Here's a mockup of what I'd like to do on jsbin (thanks, redsquare)</p>
  
  <p><a href="http://jsbin.com/ikaka" rel="nofollow noreferrer" title="sample code">sample code</a></p>
  
  <p>I'm working with legally sensitive information so I can't provide screenshots of the app. I have, however, taken some shots and blocked out the text and interface, leaving only the window structure.</p>
  
  <p><a href="http://i278.photobucket.com/albums/kk93/Glazius_bucket/InIE7.png" rel="nofollow noreferrer" title="how it looks in IE7">how it looks in IE7</a></p>
  
  <p><a href="http://i278.photobucket.com/albums/kk93/Glazius_bucket/InFirefox.png" rel="nofollow noreferrer" title="how it looks in Firefox 3">how it looks in firefox 3</a></p>