css - WordPress - 减少主菜单和 slider 之间的垂直空间

标签 css wordpress menu wordpress-theming revolution-slider

我创建了一个 wordpress 单一主题,但我对 CSS 代码感到困惑,其中 CSS 规则应该更改显示以使菜单和图像 slider 革命看起来更接近。

我想缩小主导航菜单和我的旋转 slider 之间的空间

这是我的网站网址:http://www.warungrempong.com/

我正在尝试使用这个 CSS 代码:

.admin-bar .nav-container {
    min-height: 0;
}

但它没有按预期工作,只有在我的浏览器开发工具上使用它时才能工作。
当我尝试更改我的网站时,没有任何反应。

我该如何解决这个问题?

谢谢。

最佳答案

在您的事件子主题(或主题)的 style.css 文件中,您应该添加:

.nav-container {
    min-height: inherit !important;
}

当查看生成的主页源代码时,您的主题似乎在 html 文档中嵌入了一些 CSS 规则,因为您有这个(在该源代码的第 41 行):

<style id='ebor-style-inline-css' type='text/css'>
nav .pb80 {
    padding-bottom: 0px;
    padding-top:0px;
}
.pt120 {
    padding-top: 0px;
}
.nav-container { /* ==========================> HERE ONE TIME */
    min-height: 0;
}
.logo { max-height: 300px; }

.nav-container { /* ======================> HERE ANOTHER TIME 
          As this is the last instance, it get the priority on first one! */
    min-height: 491px;
}

.admin-bar .nav-container {
    min-height: 523px;
}

@media all and (max-width: 767px){
    .nav-container {
        min-height: 366px;
    }

    .admin-bar .nav-container {
        min-height: 398px;
    }
}

</style>

So may be you have add this CCS rules yourself somewhere in your theme settings. The best thing, should be to remove that 2 repetitive CSS rules, and your issue should get solved without any need…

关于css - WordPress - 减少主菜单和 slider 之间的垂直空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38922838/

相关文章:

javascript - 如何在特定页面加载时间后显示 Div?

php - wc_get_template 返回空值

jquery - Vimeo 风格下拉内容/下拉菜单

css - 链接样式未在 Safari 中显示

javascript - 使用 anchor 标记 a 在网格中创建动态按钮

javascript - 当 Blogger 帖子未托管在 Blogger 上时获取其第一个图像 URL

css - 试图让我的 Wordpress 导航真正响应 - 功能主题(优雅主题)

html - 无法将我的菜单变成下拉菜单

html - CSS:td 上的双边框显示为单边框

WordPress 创世主题 - 将 Logo 从文本更改为图形