[英]Body not wrapping content (not float or body,html 100% thing…)
Why the hell isnt the body/html or .main div wrapping my .container div's, when browsers width is between 767-960 px?! 当浏览器宽度介于767-960像素之间时,为什么地狱不是body / html或.main div包装我的.container div? this cause you to be able to scroll horizontally.
这使您能够水平滚动。 im so confused, this should work!
我很困惑,这应该工作!
All code i have is this: 我所有的代码都是这样的:
html, body {
width: 100%;
}
.container {
.clearfix;
margin: 0 auto;
}
@media (min-width: 767px) {
.page-header
{
height: 180px;
}
.container {
width: 960px;
}
}
Fixed this by adding this to the media-query: 通过将此添加到媒体查询来解决此问题:
html, body {
min-width: 960px; // <= width of the .container
}
If anyone could explain this (why the .container isnt pushing body to be 960px) id be glad! 如果有人能解释这个(为什么.container不推动身体为960px)id很高兴!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.