开发者

When browser size get smaller website 'moves up'

开发者 https://www.devze.com 2023-03-11 03:00 出处:网络
I really dont know what is causing this problem, but when I make the browser window smaller you can see the website move upwards slightly(about 30px). Vice versa, when you o开发者_JS百科pen the browse

I really dont know what is causing this problem, but when I make the browser window smaller you can see the website move upwards slightly(about 30px). Vice versa, when you o开发者_JS百科pen the browser window you can see the website move downward.

Help?

www.for-instance.net


You have the following style:

body {
    ...
    margin: 3.5% auto;
    ...
}

The percent is measuring the total height of the browser, and changing it that way. Set it to pixel-based height, and you will see that it sits still.

0

精彩评论

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

关注公众号