Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>height: 100%;</code> is a tricky thing for web pages, as you are no doubt keenly aware. Looking at your code in Firefox 3.5.7 the <code>#sidebar</code> and <code>#rightcontent</code> columns only have only the height of about an <code>em</code> — just enough to hold the text you put in them, not the full page length I think you were hoping for. The columns are trying to calculate percent height from the explicit height of their parent, but <code>#wrap</code> also has a %-based height, which causes this to fail (at least in my Firefox).</p> <p>Now, as you've described it (the columns being the right height, except for an extra 40px scroll) what seems to be happening is that whatever browser you're using is passing the full height of <code>#wrap</code> as 100% of <em>it's</em> parent, which is <code>&lt;body&gt;</code>. So naturally, when your columns are sized to the height of <code>&lt;body&gt;</code>, which also encloses the height of your header and footer, the columns are too tall.</p> <p>A trick I've used a couple of times to achieve the full page length appearance of columns that scales appropriately to whatever page dimension is to stick a <code>position: fixed; bottom: 0px;</code> <code>&lt;div&gt;</code> tag at the bottom of my page with just enough markup inside it to mimic the structure and relevant CSS of the columns.</p> <p>Here's what I did to your page to get this effect:</p> <pre><code>&lt;!--Add this to your HTML--&gt; &lt;div id='columnfooter'&gt; &lt;div id='sidecont'&gt;&lt;/div&gt; &lt;div id='rightcont'&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p><br/></p> <pre><code>/* And modify your CSS like this */ #sidebar, div#sidecont { width: 30%; background: #ebebeb; float: left; } #rightcontent, div#rightcont { width: 70%; background: #fff; float: right; } div#rightcont, div#sidecont { height:100%; } #footer { width: 100%; background: #414141; height: 40px; position: relative; bottom: 0px; } div#columnfooter { position: fixed; z-index: -25; bottom: 40px; height: 100%; background: #ebebeb; width: 100%; } </code></pre> <p>Yes, using the HTML to form empty background columns this way does kind of mix semantic and stylistic markup — a technical no-no. But the CSS is clearly abstracted from the HTML, and with this code I have full page columns, <code>#footer</code> at the bottom (even when more than a page of content is added to either column above it), and it behaves the same in the latest versions of Firefox, Safari, Opera, Chrome and IE8 at any resolution (tested down to 800x600).</p> <p>Hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload