开发者

body size when you have a window scroll

I have a basic question... When y开发者_运维知识库ou have a html page with a scrollbar, the size of the body element remains equal to the window size, not to the effective width of the page inside the window... why? Is there a way to modify this behaviour?


I think this only happens if you float the contents inside the body, and do not predict for expansion of the container..

If you care to show some code, we might be able to tell you exactly why it happens in your case..


I'm not sure what you're asking, but I believe you want NO SCROLLBARS, am I right?

If so, then put this in your CSS

html, body {
  margin: 0px;
  padding: 0px;
  width: {whatever width you want}
}


I can't say why exactly it's happening, but you can use CSS "min-width" instruction to overcome this behavior. Hope it helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜