views:

165

answers:

3

Since I got TLDR (too long didn't read) comments, I stripped 90% of this away, including everything I have tried.

The layout is very, very simple.

-----------------------------------------------------------------
|                                                               |
|   This menu area is fixed and does not scroll up off the page |
|              - NO SCROLL BARS -                               |
|---------------------------------------------------------------|
|                                                               |
|   | ------------------------------------------------------|   |
|   |                                                       |   |
|   |                                                       |   |
|   |      This area, with padding on the left and right,   |   |
|   |      has a scroll bar on its right side (not all      |   |
|   |      the way to the right side of the page), and is   |   |
|   |      attached to the bottom of the browser window -   |   |
|   |      when the bottom of the browser is resized up,    |   |
|   |      this windows shrinks, and scroll bars DO NOT     |   |
|   |      appear on the far right side of the page.        |   |
|   | ------------------------------------------------------|   |
|---------------------------------------------------------------|

The code that implements the above with frames works in IE7, IE8 and Firefox 3.6, with no browser dependent code. The frames code pulls in two .html pages to fill the two "windows" above. Simple. Terrible for Google.

Here is an example of CSS code that doesn't work. I would have 100+ such examples if I had saved all of them. I'm running the Apache server locally to pull in the SSI's.

<html>
<body>

<div style="float: top; position: fixed; width: 95%; height: 140; border-style: solid">
<!-- SSI code deleted - includes code from another page --> 
</div>

<div style="overflow: auto; top: 100; width: 900; height: 500; background-color:white;
 color:black; text-decoration:none">
<!-- SSI code deleted - includes code from another page -->
</div>

</body>
</html>
  • What this code does in Firefox: The bottom scrolling window is at the top of the page (no margin). (Very wrong.) When the bottom of the browser window is moved up (making the browser window smaller) a scroll bar appears on the right side of the page. (Wrong.)
  • What this code does in IE 8: The bottom scrolling window sits properly below the top menu window, but there is a scroll bar for the whole screen on the right side, and you have to use both scroll bars to get to the bottom of the text. (This is the only example I tried in IE 8, as I've spent all my time trying to get it to work in Firefox.)

I have tried too many online ideas to mention, and I've stripped what things I did try because of the TLDR comments.

I should mention that the two included HTML files use divs everywhere, for practically every line of text, with some position:absolute declarations. (I didn't write that...) The second HTML file also uses a table. If you want to see the included code I will provide you with the URL to it, but I don't want it posted.

A: 

There is a lot of code to look at there, and as indicated in a comment I got a "TLDR error" while trying to read it.
That being said, in my experience when things are behaving "wrong", it is because the html is too complex, there are some unbalanced elements, or there are elements that are missing a close.
Start by looking at that, and if it all works, you could try using a framework, ExtJS and YUI both have layout managers that achieve exactly what you are looking for, even though they can be a pretty heavyweight solution.

YUI Layout manager: http://developer.yahoo.com/yui/layout/
ExtJS Layout manager: http://www.extjs.com/deploy/dev/examples/layout/complex.html

Ed Griebel
Because of the TLDR comments, I've stripped it way down.
Rilien
+3  A: 

Consider using something similar to the following:

<!DOCTYPE html>
<html>
<head>
<title>Your page title</title>
<style>
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 140px;
        overflow: hidden;
    }

    .content {
        position: absolute;
        top: 150px; /* 140px (header) + 10px top padding */
        left: 10px; /* 10px padding */
        right: 10px; /* 10px padding */
        bottom: 10px; /* 10px padding */
        overflow: auto;

    }
</style>
</head>

<body>

<div class="header">
    <!--#include virtual="/nav2.html" -->
</div>

<div class="content">
    <!--#include virtual="/main2.html" -->
</div>

</body>
</html>

This results in a header section that is 140 px tall and is flush with the top, left, and right sides of the page. The body takes up the rest of the page and has 10 px padding on each side. Note that the DOCTYPE declaration (the first line) is necessary.

Note: While most modern browsers will work fine with this page, this page will NOT display correctly in IE6. IE6 does not support fixed positioning.

Wesley
Thanks. That solved my problem, and it works in Firefox and IE 8. I had tried putting most of those setting in the div's, rather than the format you are using, and it didn't work.
Rilien
If the solution works, go ahead and accept this answer - this will ensure that it appears at the top of the list of answers. Any future visitors will see that this answer worked for you.
Wesley
A: 

Can someone tell me how to accept the above answer - the one I commented on, that the person then commented on saying to accept it?

I read the FAQ, and there's supposed to be a check box to the left of the answer. It's not there. There is an up and down arrow, but when I select it I get a message saying I have to log on to vote. The top of the page has my username - so the site still knows who I am from when I put my e-mail address on the post form, and this site advertises that no registration is required to use it, so where is the check box to accept the answer?

Thanks.

Rilien
I got my accounts joined - and marked the answer.
Rilien