开发者

How do I require an HTML document (webpage) to be a certain size, or use scroll bars

So, I'm making a website, and I'm using div tags to sort of break it apart and make it look orderly. I'm using this sort of as a "container" to hold the whole website, its CSS is:

div#container {
    width:850px;
    height:850px;
    width:50%;
    margin:auto;
    text-align:center;
    border:1px ridge green;
}

And then I just have the container div tags surrounding my whole website.

The issue is, when I resize it, the whole thing goes sort of crazy, the content breaks out of its container, and what not.

How do I prevent the container from resizing, and prevent the content in the container from resizing with it? The rest of the webpage can resize (the开发者_如何学C parts outside of the container), but the container holding the website must not be resizable (so scroll bars would popup, but the container itself would stay the same size)?


Remove the second width: 50% and add overflow: auto.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜