Jump to content

Static header


Ant

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...