开发者

<BODY> position off, can't add fixed background image

开发者 https://www.devze.com 2023-01-26 23:58 出处:网络
Thetag position on this page is off: http开发者_如何学编程://www.starcraft-source.com/ It\'s like it has a 40+ top margin on it

The tag position on this page is off: http开发者_如何学编程://www.starcraft-source.com/

It's like it has a 40+ top margin on it

I can't figure out why and I'm trying to add a fixed background image and it's really not looking right. Anyone have any ideas why?


The definition that's causing it is this:

#hd {
    margin-top: 99px;
    position: relative;
}

If you turn that off, the apparent margin on the body goes away. Somehow, its being the first item in the page and being positioned relatively is causing it to go like that. I'm not certain of the precise reason why.

0

精彩评论

暂无评论...
验证码 换一张
取 消