dongwei9771
2015-12-29 16:19 阅读 16
已采纳

移动中的填充顶部过大

I created my website using Bootstrap and then converted it to WordPress: My website. I'm not new to Bootstrap, but am new to WordPress.

I'm having a problem that I just can't solve: When I look at the blog page or any of the posts pages in mobile view, there's a huge padding at the top of the post header.

I've tried modifying my CSS file to reduce padding at the top of the heading:

.entry-header {
    padding-top: 10px;
}

but it's just not working.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    duanhuilao0787 duanhuilao0787 2015-12-29 16:36

    The problem is not with your padding but with your #sidebar div. The sidebars height is causing the mobile issue.

    As you are hiding all of the content in your sidebar you might as well hide the whole sidebar on mobile using a media query.

    Add this toward the bottom of your css:

    @media only screen and (max-width: 767px) {
        #sidebar {
            display:none;
        }
    }
    
    点赞 评论 复制链接分享

相关推荐