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.
精彩评论