The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Responsive Fixed Header with CSS Reply To: Responsive Fixed Header with CSS


If you set

#header {
    max-width: 640px;
    width: 100%; 

and remove the padding from #container you get some results, but its still not desirable.

The problem with position: fixed is that it takes the element out of the document ‘flow’ so it wont respect the padding applied to its parent.

Some things you might want to look at:
Persistent Headers