hello,
I have this problem on making a sub-menu in my navigation bar. it seems to be overlapped. how can I prevent this? I can't work out how to make the sub-menu open when you hover on the main word.
I have use the display:none thingy, but still, it doesn't seems to work.
this is the css,
I have this problem on making a sub-menu in my navigation bar. it seems to be overlapped. how can I prevent this? I can't work out how to make the sub-menu open when you hover on the main word.
I have use the display:none thingy, but still, it doesn't seems to work.
Code:
<div id="nav">
<ul>
<li><a href="admin.php">HOME</a></li><br>
<li><a href="#">USER</a><br>
<ul id="submenu">
<li><a href="new.php"> Add New User</li>
<li><a href="#"> Choose User</li>
</ul></li>
<li><a href="#">Pengesah</a></li><br>
<li><a href="#">Penyedia</a></li><br>
<li><a href="#">UPDATE</a></li><br>
<li><a href="logout.php">LOGOUT</a></li>
</ul>
</div>
this is the css,
Code:
div#nav{
text-align: center;
list-style: none;
font-size: 13px;
margin-bottom: none;
float: left;
padding-top: 5px;
}
div#nav a {
text-decoration: none;
color: #000000;
display: block;
padding: 7px;
}
div#nav ul {
list-style-type: none;
padding-left: 0;
margin-left: 10px;
background:-o-linear-gradient(bottom, #0069d3 5%, #007fff 100%);
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #0069d3), color-stop(1, #007fff) );
background:-moz-linear-gradient( center top, #0069d3 5%, #007fff 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0069d3", endColorstr="#007fff");
background: -o-linear-gradient(top,#0069d3,007fff);
background-color:#0069d3;
width: 140px;
height: 840px;
border-left: 2px solid #000000;
border-right: 2px solid #000000;
position: relative;
display: inline-table;
}
div#nav li {
text-decoration: none;
display: block;
}
div#nav li{
display: block;
background-color: #ce90dd;
border: 2px dashed #000000;
border-left: 5px solid #000000;
border-right: 5px solid #000000;
border-bottom: 2px dashed #000000;
margin: 10px 0 10px 0;
margin-bottom: none;
width: 100px;
float: left;
padding: 15px;
height: 30; //tinggi block//
}
div#nav li a:hover {
color: #FFFFFF;
background-color: #35af3b;
}
#submenu ul ul {
display: none;
}
#submenu ul li: hover > ul {
display: block;
}
#submenu ul li {
background:##4b545f;
background: linear-gradient(top, #4f5964 0%, #5f6975 40%);
background: -moz-linear-gradient(top, #4f5964 0%, #5f6975 40%);
background: -webkit-linear-gradient(top, #4f5964 0%,#5f6975 40%);
}
#submenu ul li:hover a{
color:#fff;
}
#submenu ul li a{
display:block;
padding: 25px 40px;
color:#757575;
text-decoration: none;
}
Comment