我已将DIV高度设置为54px但由于某种原因,UL仅为其中的一半 - 由于某种原因,所有导航链接都位于div的顶部。
<div id="menu">
<ul class="left" style="display: none;">
<li id="dashboard"><a href="<?php echo $home; ?>" class="top"><?php echo $text_dashboard; ?></a></li>
</u>
</div>
以下是我认为CSS中的内容:
#menu {
background: url('../image/menu.png') repeat-x;
position: relative;
z-index: 1;
height: 54px;
clear: both;
padding: 0px 30px;
min-width: 900px;
}
#menu > ul.left {
float: left;
}
#menu > ul.right {
float: right;
}
#menu > ul {
position: relative;
margin: 0;
padding: 0;
}
#menu > ul ul {
list-style: none;
margin: 0;
padding: 0;
background: url('../image/transparent.png');
}
#menu > ul a {
display: block;
text-decoration: none;
}
#menu > ul li {
float: left;
list-style: none;
}
#menu > ul > li + li {
background: url('../image/split.png') center left no-repeat;
}
#menu > ul .top {
padding: 10px 15px 9px 17px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
text-align: center;
}
#menu > ul li ul {
position: absolute;
}
#menu > ul ul li {
padding: 2px;
clear: both;
}
#menu > ul .selected .top {
background: url('../image/selected.png') repeat-x;
color: #FFFFFF;
}
#menu > ul .parent {
background-image: url('../image/arrow-right.png');
background-position: 95% center;
background-repeat:no-repeat;
}
#menu > ul li ul ul {
margin: -29px 0 0 161px;
}
#menu > ul li li a {
padding: 5px;
margin: 1px;
color: #FFFFFF;
width: 147px;
}
#menu > ul li li > a:hover {
margin: 0px;
border: 1px solid #BD4C14;
background-color: #391706;
}
知道需要改变什么以扩展UL的高度,就像我做了DIV一样?