我如何设置我的导航div的高度为100%,它包含标题div。根据CMS我使用的布局是这样的。如何设置我的导航div的高度为100%,它包含标题div?
<header>
<div class=“container”>
<nav class=“nav-primary collapse navbar-collapse”>
其中一些类来自bootstrap。标题高度显式设置为80px。容器div没有高度属性。导航CSS高度属性为auto!important。 CSS在下面。
我需要导航为100%。我在堆栈溢出检查其他帖子,但没有发现类似于这种情况。
html, body {
height:100%;
}
header {
position: fixed;
width: 100%;
z-index: 999;
min-height:80px;
}
.nav-collapse {
display: block !important;
height: auto !important;
padding-bottom: 0;
overflow: visible !important;
}
请分享的jsfiddle可重复〔实施例。 –