1.11M Members

keep header at top of page

 
0
 

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;">
</div>

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.

 
0
 

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.

http://www.howtocreate.co.uk/fixedPosition.html

Question Self-Answered as of 4 Years Ago
 
0
 

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

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