【问题标题】:Can't find where does the extra space on the right of my site comes from找不到我网站右侧的多余空间来自哪里
【发布时间】:2019-11-06 01:11:16
【问题描述】:

我刚刚注意到,在我的一个网站上,您可以水平滚动,并且内容右侧实际上是空白区域。不知道这是从哪里来的。我尝试添加以下 CSS,以突出显示导致问题的元素,但没有:

* {
    background: black !important;
}

* * {
    background: pink !important;
}

* * * {
    background: red !important;
}

* * * * {
    background: blue !important;
}

* * * * * {
    background: green !important;
}

* * * * * * {
    background: grey !important;
}

* * * * * * * {
    background: brown !important;
}

* * * * * * * * {
    background: beige !important;
}

* * * * * * * * * {
    background: black !important;
}

* * * * * * * * * * {
    background: pink !important;
}

* * * * * * * * * * * {
    background: red !important;
}

* * * * * * * * * * * * {
    background: blue !important;
}

* * * * * * * * * * * * * {
    background: green !important;
}

* * * * * * * * * * * * * *  {
    background: grey !important;
}

* * * * * * * * * * * * * * * {
    background: brown !important;
}

* * * * * * * * * * * * * * * * {
    background: beige !important;
}

* * * * * * * * * * * * * * * * * {
    background: lightgreen !important;
}

* * * * * * * * * * * * * * * * * * {
    background: lightcoral !important;
}

* * * * * * * * * * * * * * * * * * * {
    background: yellow !important;
}

* * * * * * * * * * * * * * * * * * * * {
    background: purple !important;
}

* * * * * * * * * * * * * * * * * * * * * {
    background: rebeccapurple !important;
}

* * * * * * * * * * * * * * * * * * * * * * {
    background: sandybrown !important;
}

* * * * * * * * * * * * * * * * * * * * * * * {
    background: saddlebrown !important;
}

* * * * * * * * * * * * * * * * * * * * * * * * {
    background: navajowhite !important;
}

* * * * * * * * * * * * * * * * * * * * * * * * * {
    background: orange !important;
}

* * * * * * * * * * * * * * * * * * * * * * * * * * {
    background: orangered !important;
}

* * * * * * * * * * * * * * * * * * * * * * * * * * * {
    background: greenyellow !important;
}

你可以看到问题here

我不知道如何调试这个。

任何想法表示赞赏。

【问题讨论】:

  • 您需要在此处发布minimal reproducible example,在您的问题中,而不是任何第三方网站。
  • 我不知道是哪个部分导致了这个问题,所以我不能发布一个最小的可重现示例。如果我这样做了,我就不必在这里发帖了。
  • 那么你有两个问题。当您的链接更改或完全消失时,您的问题将变得毫无用处。这就是为什么这样的事情是不允许的。
  • 另外,请在此处添加有意义的代码和问题描述。不要只链接到需要修复的站点——否则,一旦问题得到解决或者您链接的站点无法访问,这个问题将对未来的访问者失去任何价值。发布 Minimal, Reproducible example (or MCVE) 来证明您的问题将帮助您获得更好的答案。有关详细信息,请参阅 Something on my web site doesn't work. Can I just paste a link to it? 谢谢!
  • 提示....您的页面恰好是大约 3.4k 像素宽

标签: html css wordpress


【解决方案1】:

您可以通过以下方式快速解决问题:

#wrapper, .container-inner {
    min-width: 320px;
    overflow: hidden;
}

检查并告诉我。

【讨论】:

    【解决方案2】:

    下面的代码会导致额外的空间。 .col-3cm .main-inner{padding-left: 340px;}

    【讨论】:

      【解决方案3】:

      用这个解决了:

      html {
          max-width: 100%;
          overflow-x: hidden;
      }
      

      【讨论】:

        猜你喜欢
        • 2011-08-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-08-04
        • 1970-01-01
        • 2020-07-11
        • 2012-10-24
        相关资源
        最近更新 更多