title: Firefox CSS: Given 2 divs, how can I float the *second* one to the right using static positioning?
body: <p>I'm working on a <a href="http://userstyles.org/styles/12154" rel="nofollow noreferrer">Youtube userstyle script</a> that displays comments side by side with the video so you can watch the video and read the comments at the same time (what a marvelous idea - duh). You can see in the screenshots how far I've got. That means I only care about Firefox, and that CSS3 goes.</p>
  
  <p>The problem I have is that I want to make a fully fluid layout and have the "other videos" div float to the right, while the middle div (the comments) stretches to fill the remaining space between the left div (the video played) and the right div (the "other videos").</p>
  
  <p>Translated to CSS, the problem is: given divs "main", "rightnav" and "footer", in this fixed order in the document, how can I make the rightnav div float to the right, and the footer BELOW it? The best I managed to do was to absolutely position "rightnav" (right: 0), but then the footer goes below the "main" div, not below both of them. I've looked at <a href="https://stackoverflow.com/questions/220273/css-positioning-div-above-another-div-when-not-in-that-order-in-the-html">Use CSS to reorder DIVs</a> already. Negative 'top' values are out, as they depend on the content of the 'main' div.</p>
  
  <p>Here's the source code:</p>
  
  <pre><code>&lt;html lang="en-US"&gt;
  &lt;head&gt;
  &lt;style type="text/css"&gt;
  
  #main {
     border: 1px solid;
     float: left;
     margin-right: 410px;
  }
  
  #rightnav {
     background-color: yellow;
     opacity: 0.5;
     border: 1px dotted;
     width: 400px;
     float: right;
     position: absolute;
     right: 0;
  }
  
  #footer {
     clear: both;
  }   
  
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="baseDiv" style="width: 100%"&gt;
    &lt;div id="main"&gt;
    &lt;script&gt;for (var i=1; i&lt;100; i++) document.write('main ');&lt;/script&gt;
    &lt;/div&gt;
  
    &lt;div id="rightnav"&gt;
    &lt;script&gt;for (var i=1; i&lt;200; i++) document.write('rightnav ');&lt;/script&gt;
    &lt;/div&gt;
  
    &lt;div id="footer"&gt;
    &lt;script&gt;for (var i=1; i&lt;100; i++) document.write('footer ');&lt;/script&gt;
    &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Hopefully it's clear what I want to achieve: the "footer" below the two divs, and the "main" div fluid.</p>
  
  <p>Thanks for any ideas.</p>