0

我需要将常规导航栏转换为页面上的下拉菜单,但我对代码感到困惑。这是现有的代码。

下面是#header 和#mainnav 的CSS - 有人可以帮忙指出我需要在哪里添加下拉位吗?我真的很困惑,似乎没有任何效果 张贴图片

**header

*******************/

#header {

background:url(images/bgHeader.jpg) no-repeat center top;
height:274px;
}

#header h1
{
float:right;
width:280px;
height:200px;
margin:0 0 21px 0;
}

#header h1 a
{
display:block;
width:280px;
height:200px;
text-indent:-9999px;
}

#header h2
{
margin:0 0 0 0;
color:red;
float:left;
text-indent:-9999px;
}

#header #mainNav
{
/*clear:both;*/
float:left;
width:750px;
height:52px;
}

#header #mainNav li
{
display:block;
float:left;
margin-right:30px;
width:auto;
}

#header #mainNav li#menu-item-56
{
    width:87px;
}

#header #mainNav li#menu-item-54
{
    width: 86px;
}

#header #mainNav li#menu-item-53
{
    width: 76px;
}

#header #mainNav a
{
font-size:14px;
line-height:14px;
text-transform:uppercase;
text-decoration:none;
color:#000;
font-weight:bold;
padding-top:13px;
display:block;
}

#header #mainNav li.current_page_item a,
#header #mainNav li.current_page_parent a,
#header #mainNav li a:hover
{
background:url(images/bgMenuActive.jpg) no-repeat center top;
color:#f2152a;
}


#header .social
{
width:171px;
float:right;
margin:13px 0 0 0;
}

#header .social li
{
margin:0 0 0 9px;
}

有人可以帮忙吗?

4

1 回答 1

0

You mean you what to add dropdowns to the menu? If the theme allows it - You can use the wordpress built in menu editor in the admin to add sub items to your menu.

http://codex.wordpress.org/WordPress_Menu_User_Guide

Otherwise it's going to take more than CSS to add dropdowns.

于 2012-12-01T19:34:05.410 回答