Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html z索引、侧导航和顶导航重叠的问题_Html_Css - Fatal编程技术网

Html z索引、侧导航和顶导航重叠的问题

Html z索引、侧导航和顶导航重叠的问题,html,css,Html,Css,希望有人能发现我遗漏了什么,我正在使用topnav和sidenav的页面上工作。我想让topnav保持领先地位。我希望sidenav在它下面,没有重叠 这是我的建议,你可以点击橙色的汉堡按钮进入sidenav 我以前让它工作过,但最近对我的topnav做了一些调整,现在它只是拒绝合作。对你的任何帮助都将不胜感激 以下是CSS: body { margin:0; color: #2C3E60; font-size: ; font-family: arial; font-weight: bol

希望有人能发现我遗漏了什么,我正在使用topnav和sidenav的页面上工作。我想让topnav保持领先地位。我希望sidenav在它下面,没有重叠

这是我的建议,你可以点击橙色的汉堡按钮进入sidenav

我以前让它工作过,但最近对我的topnav做了一些调整,现在它只是拒绝合作。对你的任何帮助都将不胜感激

以下是CSS:

body {
margin:0;
color: #2C3E60;
font-size: ; 
font-family: arial;  
font-weight: bold;
font-family: ; 
line-height: 1.2;
overflow: hidden;
}

form {
margin: 0px;
padding: 0px;
}
.main {
padding: 0px; 
margin-top: 0px;
width: 100%;
height: 91%;
position:absolute;
overflow-y:auto;
background-color: #ec7c23;
}


.navbar {
overflow: hidden;
background-color: #577CC1;
min-height: 71px; 
possition: fixed;
/*z-index: 2;*/
top: 0;
width: 100%;
line-height: 1.07;
font-size: 3em;
}

.navbar a {
float: left;
display: block;
color: #ffffff;
text-align: center;
padding: 10px 10px;
text-decoration: ;
font-size: 40px;
font-weight: bold;
}

.active {
background-color: #4CAF50;
color: white;
}

.navbar .icon {
display: none;
}

.dropdown {
float: left;
overflow: hidden;
}

.dropdown .dropbtn {
font-size: 17px;    
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
font-weight: bold;
margin: 0;
height: 71px;
}

.dropdown-content {
display: none;
position: absolute;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
background-color: rgba(0, 42, 59, .8);
overflow: auto;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}

.dropdown-content a {
float: none;
color: #ffffff;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
font-size: 20px;
font-weight: bold;
}

.navbar a:hover, .dropdown:hover .dropbtn {
background-color: ;
color: white;
}

.dropbtn a:hover, .dropdown:hover .dropbtn {
background-color: #2C3E60;
color: white;
}

.dropdown-content a:hover {
background-color: #577CC180;
color: black;
}

.dropdown:hover .dropdown-content {
display: block;
}

@media screen and (max-width: 600px) {
.navbar a:not(:first-child), .dropdown .dropbtn {
display: none;
}
.navbar a.icon {
float: right;
display: block;
}
}

@media screen and (max-width: 600px) {
.navbar.responsive {position: relative;}
.navbar.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.navbar.responsive a {
float: none;
display: block;
text-align: left;
color: white;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.navbar.responsive .dropdown {float: none ;
}
.navbar.responsive .dropdown-content {
position: relative;         
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
.navbar.responsive .dropdown .dropbtn {
display: block;
width: 100%;
text-align: left;
}
}


.container {
display: inline-block;
cursor: pointer;
float: right;
}
.bar1, .bar2, .bar3 {
width: 35px;
height: 5px;
background-color: #ec7c23;
margin: 6px 0;
transition: 0.4s;
}
.change .bar1 {
-webkit-transform: rotate(-45deg) translate(-9px, 6px) ;
transform: rotate(-45deg) translate(-9px, 6px) ;
}
.change .bar2 {opacity: 0;}
.change .bar3 {
-webkit-transform: rotate(45deg) translate(-8px, -8px) ;
transform: rotate(45deg) translate(-8px, -8px) ;
}


.sidenav {
height: 100%;
width: 0;
position: fixed;
z-index: 9;
top: 0;
right: 0;
background-color: rgba(0, 42, 59, .8);  
font-weight: ;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
}
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #577CC1;
display: block;
transition: 0.3s;
}
.sidenav a:hover, .offcanvas a:focus{
color: #ec7c23;
}
.sidenav .closebtn {
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
z-index: 10;
}
@media screen and (max-height: 450px) {
.sidenav {padding-top: 15px;}
.sidenav a {font-size: 18px;}



button.accordion {
background-color: #577CC1;
color: white;
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
font-family: arial;
font-weight: bold; 
line-height: 1.2;
transition: 0.4s;
z-index: 5;
}
button.accordion.active, button.accordion:hover {
background-color: #2C3E60;
}
div.panel {
padding: 0 18px;
display: none;
background-color: rgba(0, 0, 0, 0.0);
color: #2C3E60;
font-size: ; 
font-family: arial;
font-weight: bold;
line-height: 1.2;
}

只需更正.navbar类中的输入错误


占有:固定;位置:固定

是的,是的。一旦你纠正了这一点,我想它会起作用,正如预期的那样。哦,我的天,这让我发疯了,我把我能想到的所有其他样式都弄乱了,这都是因为一个打字错误。笑死我了。谢谢你,伙计。甚至没有注意到在小提琴中被突出显示。@TyH-yep,有时我们只需要第三只眼睛:D:D