Stefan Walzer-Goldfeld Stefan Walzer-Goldfeld - 7 months ago 24
HTML Question

CSS Fixed Header

I am trying to fix my header on the top. I've looked at other posts and am sure that I'm doing it right. This is the CSS for the header:

.header{
width: 100%;
position:fixed;
top: 0px;
}


For some reason when I do this, the header disappears. Any ideas for why? And how should I change the code?
FYI I'm using bootstrap and adding this into it.

Thanks a ton, Stefan

After seeing so answer I made so edits, but it disappeared on me again. The CSS I am using is:

position: fixed;
width:960px;


Anymore help? Really appreciated.

Answer

A simple typo in your position - you want fixed not fixes.

.header{
     width: 100%;
     position:fixed;
     top: 0px;
}