Jump to content

Recommended Posts

Posted

Is it possible to create a static header and have the content below scroll underneath the header?

 

If so, is it possible to do without frames.

 

In learning to design websites I thought all that was needed was a container with a position of (X) (possibly :static, not sure ) to accomplish this effect.

 

My company's web designer is telling me it cant be done without frames and frames are outdated and not to be used.

 

Thus he's telling me I cant have that option on our company's website.

 

Thanks

A.

Posted

Is there no Javascript that could be used?

 

Im guessing you can just create the header using CSS and html, then use a Javascript for the rest of the content to give it this effect...

Posted

Andrea, my question concerns having a static header without the use of frames.

 

I was wondering if it can be done without frames and if so is it a good practice in terms of good design etc..

 

I do not need to know how it's done, just if it can be done and if it's an exceptable practice.

 

I just don't want to sound misinformed/stupid when I tell the web designer it can be done without frames etc.

Posted

With modern browsers you can use position: fixed; top: 0; in the header style and the header won't scroll. You need a background for the header to hide lower content scrolling behind it.

 

IE6 doesn't process position: fixed, so the header will scroll, but if you want a solution for IE6 then there is a complicated wrapper method shown here:-

http://www.wickham43.net/headerfooterfixexample.php

which uses position: absolute for older browsers with body height: 100% and overflow: hidden for the html style so that the position: absolute header doesn't scroll up and a separate stylesheet in a conditional comment just for IE6 which emulates position: fixed in IE6.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...