Forum Moderators: not2easy

Message Too Old, No Replies

Fixed header & footers, variable content

Is this possible with CSS?

         

Trenton

6:45 pm on Mar 17, 2004 (gmt 0)

10+ Year Member



I want to make a website with the header and the footer staying in a fixed position. The content on each page would be variable in length, and would be scrollable. The header, content and footer would cover the entire height of the screen.

So, there would be the header (200px height), then the content (screen height minus 300px) and then the footer (100px).

It's pretty easy to do this with frames. But is it possible to do this with stylesheets?

isitreal

5:31 am on Mar 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, it's possible, but it's extremeley difficult. I'm just finishing up a site that uses those techniques, and the bugs you have to solve can be very time consuming unless you keep your layout as simple as possible, even then they are not trivial.

[webmasterworld.com...]

has a decent rundown of one scenario, but be warned, these solutions are extremeley sensitive to any changes, and require lengthy testing on every single browser and OS out there before it can be considered to be in working order.

Here's one by drdoc:
[webmasterworld.com...]

You'll notice how difficult it is for these guys to get that stuff working, and they are some of the best people at this around.

There are especial problems with having a header on the page, the content tends to drift up into it when you do a page up type thing, it's very difficult for browsers to know how to deal with this stuff.

There's a been a few threads on this, but all the solutions are pretty much the same, one code for good standards browsers like opera, mozilla, safari, and some tweaks to make it work in IE windows.

No matter how good a job you do though, it's never going to work as well or as reliably as frames.