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. - <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, - 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;
-
}
try this, ,
css ..... - 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;
-
}
-
-
ul#submenu,
-
div#nav ul#myul {
-
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;
-
display: inline-table;
-
}
-
-
div#nav li {
-
text-decoration: none;
-
display: block;
-
}
-
-
ul#submenu li,
-
div#nav li{
-
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;
-
}
-
-
ul#submenu {
-
display: none;
-
position:absolute;
-
margin-left:120px;
-
margin-top: -55px;
-
height:auto;
-
}
-
-
ul#myul li:hover > ul#submenu{
-
display: block;
-
}
-
-
ul#submenu li:hover{
-
color:#fff;
-
}
-
-
ul#submenu li a{
-
display:block;
-
padding: 25px 40px;
-
color:#757575;
-
text-decoration: none;
-
}
5 13397
try this, ,
css ..... - 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;
-
}
-
-
ul#submenu,
-
div#nav ul#myul {
-
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;
-
display: inline-table;
-
}
-
-
div#nav li {
-
text-decoration: none;
-
display: block;
-
}
-
-
ul#submenu li,
-
div#nav li{
-
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;
-
}
-
-
ul#submenu {
-
display: none;
-
position:absolute;
-
margin-left:120px;
-
margin-top: -55px;
-
height:auto;
-
}
-
-
ul#myul li:hover > ul#submenu{
-
display: block;
-
}
-
-
ul#submenu li:hover{
-
color:#fff;
-
}
-
-
ul#submenu li a{
-
display:block;
-
padding: 25px 40px;
-
color:#757575;
-
text-decoration: none;
-
}
html file... - <div id="nav">
-
<ul id="myul">
-
<li><a href="admin.php">HOME</a></li><br>
-
<li><a href="#">USER</a>
-
<ul id="submenu">
-
<li><a href="new.php"> Add New User</a></li>
-
<li><a href="#"> Choose User</a></li>
-
</ul>
-
</li>
-
-
<li><a href="#">Pengesah</a></li><br>
-
<li><a href="#">Penyedia</a>
-
<ul id="submenu">
-
<li><a href="new.php"> Add New User</a></li>
-
<li><a href="#"> Choose User</a></li>
-
</ul>
-
-
</li><br>
-
<li><a href="#">UPDATE</a></li><br>
-
<li><a href="logout.php">LOGOUT</a></li>
-
</ul>
-
</div>
no problem, , :) goodluck...
Hi,
This css code also try do check - #menu{width:800px;height:82px;background-color:#666666;margin:0px 0px 0px 0px; border-radius:30px; text-align:center;}
-
#menu ul {margin:0px;padding:0px;}
-
#menu ul li{ border-radius:0px;float:left;list-style:none;margin:0px 4px 0px 4px; width:191px; padding-top:30px; height:50px;background-color:#99CC00; position:relative;}
-
#menu ul li a{ text-decoration: none !important;}
-
#menu ul li:hover{display:inline;background-color:#CCCCCC;border-radius:0px;margin:0px 4px 0px 4px; width:191px; height:45px;}
-
-
-
/* first select menu */
-
-
ul.sub li{ background-color:#00CCFF; display:inline; }
-
ul.sub li{margin:25px 0px 0px 0px; padding:0px 10px 0px 0px; position:absolute; }
-
.hover ul.sub li{ display: block;position:relative;/*relative*/ float:none; margin:0px 0px 0px 29px;
-
padding:3px 2px 2px 0px; width:150px; height:20px; }
-
-
/* second select menu */
-
.second li{ display:none;position:relative; float:none; height:35px;
-
margin:1px 0px 0px 8px; padding:10px 0px 10px 0px;}
-
.second li{ display: block; background-color:red; }
-
.second{ position:relative; height:35px; margin:0px 0px 0px 4px; padding:0px 0px 0px 0px;}
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Sander Tekelenburg |
last post by:
Trying to make some images disappear on hover (works), and others appear
on hover (works not).
In tested browsers, this gives the expected result:
IMG.disappear {visibility: visible}...
|
by: Michael Rozdoba |
last post by:
I've had some trouble getting IE to behave in respect of applying
absolute positioning to a span on an a:hover. I can get it to work, but
I don't understand why certain code causes it to fail to...
|
by: madsgormlarsen |
last post by:
I can not get hover effect on a TD to work in IE, it seams you can not
have
a hover on a td in IE?
I have treid this
body.section-2 td.current,
body.section-2 td.submenu,
body.section-2...
|
by: Jonathan |
last post by:
Hello All,
I am in the process of creating a 2/3 level collapsible/exspanible menu
(called "nav") where users can click on a category and have the
submenus appear beneath it and so on (allow...
|
by: bhosalevivek |
last post by:
I did this code from Dynamic Drive DHTML. it's working properly, but now I need submenu for "Submenu 1.2", means when I take mouse on "Submenu 1.2" I need to display "Submenu 1.2.1". I try to do...
|
by: Meri |
last post by:
Hello
Everybody on the internet seems to think this is a problem with IE but for
me it works fine with IE, but the submenus do not appear with Firefox
andOpera.
The html is a simple list with...
|
by: oll3i |
last post by:
i have written css tab menu
but my links in submenu inherit the style of a href in main menu (#menu ul li a)?
when i hover over the links in submenu they do change as i want them to change they...
|
by: omerbutt |
last post by:
hi every one i have a menu li and ul based the problem is when any specific category in the li is hovered the li or the sub-cat items appear but as i move my mouse over the sub-cat or level two li it...
|
by: KeredDrahcir |
last post by:
I am using a list to create a Main Menu with a drop down submenu. I need to able to using the hover pseudo class to display the drop down menu but IE6 only allows it on anchors. Is there a work round...
|
by: davidraimosson |
last post by:
Hi!
For a couple of days I've been trying to use Selenium to automate testing of a website. This fails because of a hidden menu item that is only displayed when the parent item in the menu is...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |