小编dan*_*dan的帖子

Why isn't my margin working with position: fixed?

JSFiddle Demo

I have a div for a header and a div for a content wrap.

For some reason, I can't have a margin on the bottom of the header that forces the content wrap to push down. It just ignores it completely and I have no idea why.

Does anyone know what is going on with this? It doesn't do this when I take away the position: fixed; attribute on the header, but I want it to be fixed …

html css css-position

10
推荐指数
2
解决办法
2万
查看次数

标签 统计

css ×1

css-position ×1

html ×1