0

My layout is responsive, but if I change the size of the page it gets all messy. I wonder how do I put a min-width on my body. so that the page can be resize to eg 500px wide.

PS:

I try set

body {
    min-width:400px;
}

but no work

I use bootstrap

The problem is when I go to change the size of my window (page). when I leave the width very small components are misaligned.

4

3 回答 3

1

You need to inspect the element with chrome/FF dev tools and make sure that bootsrap styling is not overriding your style. You can also try this:

 body {
    min-width:400px !important;
}

if that works, it means bootsrap is overriding the style.

于 2013-06-11T20:51:56.337 回答
0

You can't really control the width of the <body> element, since it must fill the browser window. Try wrapping your content in a <div> with a min width.

于 2013-06-11T20:52:27.103 回答
0

您可以为具有固定宽度的布局提供父 div,然后如果减小浏览器大小,滚动条就会出现,不会有任何混乱。

控制身体宽度是没有用的

另一种方式给出宽度大小的百分比值以保持布局结构

于 2013-06-11T21:01:23.267 回答