css - 无法解决移动设备的溢出问题

标签 css mobile

我不确定这里应该包括什么, 我检查了网站上的每个 width,但无法弄清楚为什么我在移动设备上看到我的网站右边有空白。

这是链接 http://m.mdmobile.hailstorm-technologies.com/ 我试过了

overflow:hidden;bodyhtml css 中,虽然这解决了移动设备上的问题,但我无法向下滚动桌面。

我已经为 bodyhtml 尝试了 overflow-x:hidden 并且再一次,这适用于移动设备,但增加了第二个垂直滚动条到缩小的桌面浏览器上。

html{

margin: 0;
padding: 0;
width:100%;
overflow-x:hidden;



}

body { 
color: #000000;
font-family: Arial, Helvetica, sans-serif;
margin: 0px;
padding: 0px;
background-image: url('../image/background-pattern.jpg'); 
width:100%;
overflow-x:hidden;  


}

我还包括了这个...

        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">       

最佳答案

下面一行导致了这个

#header #welcome {
float: left; /* remove this */
z-index: 5;
text-align: left;
color: #006f51;
position: relative;
}

编辑:还有一些利润,也删除它

#header #cart .heading a {
color: #006f51;
text-decoration: none;
float: right;
text-decoration: underline;
margin-right: -10px; /* remove this  */
padding: 6px 10px 6px 30px;
clear: both;
font-size: 17px;
}

关于css - 无法解决移动设备的溢出问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17591695/

相关文章:

css - 在 firefox 上使用边框动画时出现问题(至少)

CSS 下划线和字母间距

javascript - 编辑后在 jquery mobile 中重新加载页面

ios - 按关键字过滤传入的短信(IOS\IPHONE)

html - 无法将填充或边距应用于 "lead"类 <p> 元素

html - 使用Bootstrap的显示属性d-none d-md-block和d-flex的冲突

html - 仅向具有动态内容的右侧 css 上的元素添加填充

javascript - 如何检测浏览器是否为移动浏览器并在普通浏览器和移动浏览器之间切换?

javascript - 我的 Three.js 应用程序未在移动设备上运行

javascript - 为什么jplayer在iphone上玩?