CSS:当导航栏重新定位时,下拉菜单不会显示

时间:2017-05-09 17:01:59

标签: html css

我想重新定位导航栏。目前的位置:

    #navbar ul {
width: 100%;
float: left;
margin: 0;
padding: 0;
list-style: none;
background-color: #5D2C2C;
/*position: relative;
bottom: 115px;*/
}

    #navbar ul li {
float: left;
/*position: relative;
left: 420px;*/
}

#navbar li li {
display: none;
}

#navbar li:hover li {
display: block;
width: inherit;
}

#navbar a {
font-family: "Palatino Linotype";
color: #FFF;
text-decoration: none;
padding: 2px 5px;
}

下拉列表正确显示 menu drops down and 2 options can be seen

但当我删除/ *注释* /以使条形图正确定位时,菜单会下降,但这两个项目没有显示,我无法找到原因

drop down menu showing no options

HTML,如果需要:

<div id="navbar">
<ul>
        <li><a href="#intro">Introduction</a></li>
        <li><a href="#history">History</a></li>
        <li><a href="#national">National Flags</a></li>
        <li><a href="#maritime">International Maritime Signal Flags</a>
            <ul>
                <li><a href="#letters">Maritme Signals: Letters</a></li>
                <li><a href="#numbers">Maritme Signals: Numbers </a></li>
            </ul>
        </li>
</ul>

0 个答案:

没有答案