Forums

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

Home Forums CSS CSS Fixed Header Issues…KEEPS ALIGNING LEFT!!!! Re: CSS Fixed Header Issues…KEEPS ALIGNING LEFT!!!!

#66721
Josh
Member

gno’s code will work as well. But another solution is to wrap the fixed div with a relative div and apply position styling to the relative div.

The CSS:


#headerWrap{
position:relative;
width:600px;
height:80px;
margin:0 auto;
}

#header{
position:fixed;
width:600px;
height:80px;
background:blue;
}

The HTML: