开发者

Why does my website load to the extreme left?

开发者 https://www.devze.com 2023-03-26 11:07 出处:网络
When 开发者_Python百科ever my website loads I can only see half of it unless I scroll to the left. I tried centering it by putting background-position: center left and it works. But when I zoom out/in

When 开发者_Python百科ever my website loads I can only see half of it unless I scroll to the left. I tried centering it by putting background-position: center left and it works. But when I zoom out/in it moves to the left/right. Anyone have solutions?

Thanks


I use something similar to the below code for example, if we have a div named wrapper, and width 960px, use the following code.

#wrapper {
   width: 960px;
   position: relative;
   margin: auto;
}    

margin: auto; will automatically center your webpage

0

精彩评论

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