Ilja,
there are definite problems afoot. Gecko is rendering the page without CSS, so I am guessing you stylesheet is being served with a MIME type of text instead of CSS.
A mixture of fixed, absolute and relative positioning, no holds barred hey?!
Anyway, with slight modification you can get it working in Gecko based browsers by using right positioning of 0 on the main div and setting an overflow of auto (scroll will give a horizontal scroll bar as well).
Code:
body {
margin: 12px;
background-color: black;
}
#screen {
position: fixed;
width: 60%;
height: 80%;
top: 10%;
left: 20%;
background-color: white;
text-align: center;
vertical-align: middle;
z-index: 2;
}
#header {
position: relative;
width: 100%;
height: 120px;
background-color: gray;
text-align: center;
vertical-align: middle;
z-index: 2;
}
#navbar {
position: relative;
width: 100%;
height: 30px;
text-align: center;
vertical-align: middle;
z-index: 2;
}
#menubar {
position: absolute;
width: 250px;
height: auto;
top: 150px;
right: auto;
bottom: 30px;
left: auto;
background-color: green;
text-align: center;
vertical-align: middle;
z-index: 2;
}
#main {
position: absolute;
width: auto;
height: auto;
top: 150px;
bottom: 30px;
left: 250px;
background-color: white;
text-align: center;
vertical-align: middle;
z-index: 1;
overflow: auto;
right: 0px;
}
#footer {
position: absolute;
width: 100%;
height: 30px;
background-color: gray;
text-align: center;
vertical-align: middle;
z-index: 2;
bottom: 0px;
}
This doesn't work in KHTML browsers (Safari), well the positioning does, but the overflow doesn't.
IE:mac chokes completely. It is pretty tricky CSS positioning you are using.
Like ameat suggests it may be worth investigating iframes. Could you not perhaps use fixed positioning on the header and footer so that the browser scroll bar can be used for the main div? The screen div could be used to act like the body, except allowing suitable z stacking to prevent the main div sliding out of the top header, etc.