简体   繁体   English

iPhone 上的额外右边距

[英]Extra right margin on iPhone

I'm editing our News site's mobile CSS file.我正在编辑我们新闻网站的移动 CSS 文件。 On the iPhone 3gs, 4 & simulator there are some pages (not all) there is an extra right margin.在 iPhone 3gs、4 和模拟器上有一些页面(不是全部)有一个额外的右边距。

Here's an example of a page WITH the extra margin:这是一个带有额外边距的页面示例:

http://bit.ly/mMA2q7 http://bit.ly/mmA2q7

..and here's an example of a page without it: ..这是一个没有它的页面示例:

http://bit.ly/iQeOGY http://bit.ly/iQeOGY

Both pages are using the same template.两个页面都使用相同的模板。 I'm guessing the images are adding the extra margin.我猜这些图像正在增加额外的边距。

Here is our mobile CSS file http://bit.ly/iW5JVm and viewport:这是我们的移动 CSS 文件http://bit.ly/iW5JVm和视口:

<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1;"/> 

I tried applying different min-width values to the body but haven't found a solution.我尝试将不同的最小宽度值应用于正文,但没有找到解决方案。

Do you know how to get rid of this extra margin on the iPhone?你知道如何在 iPhone 上摆脱这个额外的利润吗?

your photobanner div is too wide.您的照片横幅 div 太宽。 It gets set to 500px which is way too much:)它被设置为 500 像素,这太过分了:)

try to add width:auto!important to it:)尝试添加width:auto!important :)

Same problem, I fixed it adding this code in header:同样的问题,我修复了它在 header 中添加此代码:

<meta name="viewport" content="width=1100" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM