【问题标题】:Making the width of my content div class larger while remaining responsive使我的内容 div 类的宽度更大,同时保持响应
【发布时间】:2016-08-21 18:00:38
【问题描述】:

我目前正在使用我在 ThemeForest 上购买的 WordPress 主题 Scopic。我正在尝试使内容 div 类的宽度更宽。如果我将#content 的宽度更改为 100%,则没有任何变化,但如果我将宽度更改为 950px,它会变得更宽。唯一的问题是它失去了响应功能。

您可以通过以下地址查看我的网站:https://jordans.io/portfolio/

HTML:

<!-- #content -->
<div id="content" role="main">

<article id="post-198" class="post-198 page type-page status-publish hentry clearfix">
<!-- .hentry-box -->
<div class="hentry-box">
<!-- .entry-wrap -->
<div class="entry-wrap">

    <header id="page-header">
        <h1 class="page-title">Resume</h1>
    </header>

      <div class="entry-content clearfix">
...

CSS:

.hentry .hentry-box {
    width: 850px;
}

#primary.sidebar-left #content {
    float: left;
}

【问题讨论】:

  • 原css中的宽度你改了吗?

标签: css wordpress responsive


【解决方案1】:

你的问题是你有几个地方有一个特定的宽度,还有最大宽度。尝试这样做:

#site-container { width: 100%; max-width: none; }
article.page { max-width: none; }
.page-Portfolio { width: 100%;  }

在您的文件中包含所有这些 css,您的页面将具有 100% 的宽度。

【讨论】:

    猜你喜欢
    • 2017-01-13
    • 2015-11-06
    • 1970-01-01
    • 1970-01-01
    • 2015-10-26
    • 2019-03-17
    • 2016-01-15
    • 1970-01-01
    • 2017-12-25
    相关资源
    最近更新 更多