如何在标题前面制作导航栏(响应)

时间:2013-06-04 07:06:13

标签: html navigation responsive-design

我尝试让我的博客响应,但我的导航菜单位于标题后面,我想在我的标题前面。你可以在这里查看打印屏幕

print-screen

这是媒体查询的导航代码;

.nav {
max-width:599px;
position: relative;
float:center;
padding-bottom:120px;
top:159px;
left:-60px;
min-height: 40px;
padding-top:0;
} 

.nav ul {
/*width: 599px;*/
padding: 5px 0;
position: absolute;
/*top: -13px;
left: -95px;*/
border: solid 1px #2FB8C8;
background: #2FB8C8 url(../images/icon-menu.png) no-repeat 10px 11px;
}

.nav li {
display: none; /* hide all <li> items */
margin: 0;
opacity:0.8;
}

.nav .current {
display: block; /* show only current <li> item */
}

.nav a {
display: block;
padding: 5px 5px 5px 32px;
text-align: left;
width:599px;
}

.nav .current a {
background: none;
color: #666;
}

/* on nav hover */
.nav ul:hover {
opacity:1;
}

.nav ul:hover li {
display: block;
margin: 0 0 5px;
}

.nav ul:hover .current {
background: url(../images/icon-check.png) no-repeat 10px 7px;
}

提前感谢您的帮助

3 个答案:

答案 0 :(得分:0)

您可以明确设置z-index以使这些元素前进。

答案 1 :(得分:0)

.nav {

z-index:2

max-width:599px;
position: relative;
float:center;
padding-bottom:120px;
top:159px;
left:-60px;
min-height: 40px;
padding-top:0;
} 

.Title{
/*or what ever you gave it*/
z-index:1;
}

答案 2 :(得分:0)

请查看以下链接以获取指南。您还需要使用jQuery。

http://tympanus.net/codrops/2013/04/19/responsive-multi-level-menu/
http://webdesignerwall.com/demo/responsive-menu/
http://www.hongkiat.com/blog/responsive-web-nav/
相关问题