L
Len Philpot
No code written yet, but I'm trying to figure out how to replace the
functionality of a two-frame (nav/content) layout with CSS. I've heard
the objections to frames and although I've never personally had any
problems with them, I don't dismiss the validity of the arguments
against them. However, I like the idea of a unchanging, non-scrolling
nav bar to one side of the page, with the content free to do it's thing
on the other side (personal preference). I also like the idea of the nav
frame being one piece of code that's not repeated for each content file
that gets loaded.
So, how do I duplicate that with CSS?
Let's say I have two styles :
body
{
margin-left: 220px;
}
..nav
{
position: fixed;
top: 0px;
left: 0px;
width: 200px;
height: auto;
}
I've seen enough to know that in Firefox this will work. The nav-styled
content will stay static to the left while the rest of the <body> goes
on independently about its business to the right of it.
Good deal. Except it doesn't work in IE, which apparently doesn't
recognize 'fixed'. 'absolute', 'static', etc., etc., don't give the
desired results. Both parts scroll together, either side by side, or one
renders ahead of the other.
Also, even if I get this to work as desired, how do I populate 'nav' on
multiple pages from a single source, without using SSI (is it possible
with <object>)? The reason I say without SSI is that this is just a
hobby page and my ISP doesn't provide any SSI (nor Perl, JS, php, etc.)
for the defacto ("free") web hosting with standard accounts.
Can it be done?
Thanks.
functionality of a two-frame (nav/content) layout with CSS. I've heard
the objections to frames and although I've never personally had any
problems with them, I don't dismiss the validity of the arguments
against them. However, I like the idea of a unchanging, non-scrolling
nav bar to one side of the page, with the content free to do it's thing
on the other side (personal preference). I also like the idea of the nav
frame being one piece of code that's not repeated for each content file
that gets loaded.
So, how do I duplicate that with CSS?
Let's say I have two styles :
body
{
margin-left: 220px;
}
..nav
{
position: fixed;
top: 0px;
left: 0px;
width: 200px;
height: auto;
}
I've seen enough to know that in Firefox this will work. The nav-styled
content will stay static to the left while the rest of the <body> goes
on independently about its business to the right of it.
Good deal. Except it doesn't work in IE, which apparently doesn't
recognize 'fixed'. 'absolute', 'static', etc., etc., don't give the
desired results. Both parts scroll together, either side by side, or one
renders ahead of the other.
Also, even if I get this to work as desired, how do I populate 'nav' on
multiple pages from a single source, without using SSI (is it possible
with <object>)? The reason I say without SSI is that this is just a
hobby page and my ISP doesn't provide any SSI (nor Perl, JS, php, etc.)
for the defacto ("free") web hosting with standard accounts.
Can it be done?
Thanks.