【问题标题】:Gap on right hand side of body element with 100% width主体元素右侧的间隙,宽度为 100%
【发布时间】:2013-02-13 10:03:54
【问题描述】:

我有一个位于http://michaelscottweb.com 的站点,当浏览器高于大约 450 像素时,该站点具有 100% 宽度的容器和元素。当您将浏览器缩小到 980px 以下并向右滚动时,主体上会出现大约 20px 的间隙。当您查看高于该分辨率的网站时,不会发生这种情况。有谁知道什么时候会发生什么变化?

css.

body {
    line-height: 1;
    overflow-x:hidden;
    max-width:100%;
    -moz-font-smoothing: antialiased;
    -webkit-font-smoothing: antialiased;
    background: #fff;
    color: #555;
    font-family: 'EBGaramondRegular';
    font-size: 15px;
    font-smoothing: antialiased;
    line-height: 1.5em;
    text-rendering: optimizeLegibility;
}

【问题讨论】:

  • 当我使用您提供的链接时似乎很好。
  • 真是巧合,我目前正在建设 dwightschruteonline.com

标签: html css overflow responsive-design


【解决方案1】:

看起来是google plus按钮造成的,如果你全选(command + a),你会看到google plus按钮上的轮廓突出在标题的右侧。

【讨论】:

  • 确实如此,最初看不到 iframe 的宽度,这显示得很好
【解决方案2】:

看起来你修好了。我是说你可能需要一个 CSS 重置。

【讨论】:

  • 听起来像是为一只蚊子熏蒸你的整个房子,却不确定它是否是正确的杀虫剂