I'm trying to have the header in fixed position.(Header staying fixed in top position and the content goes below) as soon as i put the position fixed the bottom margin collapses.
Any easy fix? I been trying to use clearfix, clear:both ect..
I'm trying to have the header in fixed position.(Header staying fixed in top position and the content goes below) as soon as i put the position fixed the bottom margin collapses.
Any easy fix? I been trying to use clearfix, clear:both ect..
固定定位元素在典型盒子模型的流程之外
您可以在下面的内容上添加 margin-top 或在body
如果你想得到一些东西: 你应该使用sliderHolder的更改规则到这个:
#sliderHolder {
margin-top: 158px;
width: 100%;
height: 312px;
}
You could make it absolute position. I'm not sure if that helps because your question is unclear.
如果您希望标题保持固定,请添加以下内容:
#sliderHolder {
width: 100%;
height: 312px;
margin-top: 158px;
}
你不需要clear:both
,因为那是花车。