0

I have centered a div on a page for a group project and while the div itself is centered, the websites contents are centered with the scroll bar in mind. What I mean by this is that the web page contents are centered so that the width of the screen is measured without the scroll bars width. So if the monitor was originally 100px wide, it gets read as 100-(scroll bar width) px wide. Unfortunately, this has caused my fixed position div to be a scroll bars width off center from the rest of the site and it looks pretty funky. Any way to fix that? Can't use jquery, can potentially use a little bit of JS.

Here's the link to my site so you can see what I'm talking about. http://51713941.nhd.weebly.com/index.html

4

1 回答 1

0

让我们看一些代码。

这通常可以用 css 解决。保证金:自动

您应该使用 css 中的盒子模型概念来设置网站内容的样式和放置

同样,这个问题似乎相当模糊。

于 2013-05-14T22:44:27.427 回答