MyBB Community Forums

Full Version: How do I fix my fixed header?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Set the margin on the body to 0.

In the header, use top:0px instead of that negative margin and set z-index to 50
(2013-07-17, 01:33 AM)ikhwanulfikri Wrote: [ -> ]position: relative;

see how position work here: http://www.w3schools.com/cssref/playit.a...s_position

I thought relative and center in CSS positions were the same thing Undecided
(2013-07-17, 12:51 PM)Arbaz Wrote: [ -> ]
(2013-07-17, 01:33 AM)ikhwanulfikri Wrote: [ -> ]position: relative;

see how position work here: http://www.w3schools.com/cssref/playit.a...s_position

I thought relative and center in CSS positions were the same thing Undecided

I think it adds:

pisition: relative;
align: center;

works. but I have not tried it.
Sorry for not being on, and I did what you suggested Leefish but it seem like my header is going over my fixed header instead of behind it when scrolling. I still can't center my header and to make it more specific on what I mean, I made a little diagram to describe the issue.
http://gyazo.com/66138cf44239921ab4e550f5932f475b

I hope it help clear your mind on what I meant. Please help!

Fixed! I figured it out, I just had to delete my container which contained my header and fixed header.
Pages: 1 2