keep header at top of page


Here's the code I'm currently using which works fine in Chrome, Safari, FF, Opera, but not in IE6. (Haven't tested IE7/8)

<div style="position:fixed;width:100%;top:0;">

What I need is for the header of my page to stay at the top, regardless of page scroll. I've been searching the net for a fix and have come up empty handed. I'd prefer not having to resort to javascript.


So I guess the problem is that IE6 doesn't implement the fixed position. So for those curious I found a page describing how to work around this. Between that and the other comments on the page (as referenced by the author) the solution works smoothly without the need for any javascript.

Question Self-Answered as of 5 Years Ago

Actually, IE implements fixed positioning wrong. It does not follow the standard.

Isn't it about time forums rewarded their contributors?

Earn rewards points for helping others. Gain kudos. Cash out. Get better answers yourself.

It's as simple as contributing editorial or replying to discussions labeled or OP Kudos

This question has already been solved: Start a new discussion instead
Start New Discussion
Tags Related to this Article