473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

CSS Menu - Keep main menu item highlighted

Hey hey....

Need some help with CSS menus. I need to figure out how to keep my main
menu items highlighted when I am hovering on sub-items or
sub-sub-items. Here is my code:

#menu {
width: 161px;
}

#menu ul {
list-style: none;
margin: 0;
padding: 0;
}

#menu a, #menu h2 {
font: bold 11px/16px arial, helvetica, sans-serif;
display: block;
margin: 0;
padding: 2px 3px;
text-transform: uppercase;
}

#menu h2 {
color: #fff;
background: #000;
text-transform: uppercase;
}

#menu a {
color: #fff;
text-decoration: none;
}

#menu a:hover {
color: #000;
border-width: 1px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
margin: 0;
padding: 1px 3px;
}

#menu li {position: relative;}

#menu ul ul ul a {
border-width: 1px;
border-style: solid;
border-color: #ccc #888 #555 #bbb;
padding: 1px 3px;
}

#menu ul ul ul {
position: absolute;
top: 0;
left: 100%;
width: 100%;
background: #999;
}

#menu ul ul ul UL {
position: absolute;
top: 0;
left: 100%;
width: 100%;
background: #CCC;
}

div#menu ul ul ul,
div#menu ul ul li:hover ul ul
{display: none;}

div#menu ul ul li:hover ul,
div#menu ul ul ul li:hover ul
{display: block;}

What can I do to fix this so I know what main menu option I'm under
when hovering on sub-items?

Thanks!

Aug 5 '05 #1
0 1853

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Maria Gonzalez | last post by:
Hello, I would like to know if it is possible to create a Navigational Menu that has all the Major Categories on top row, then when a mouse is over it, the bottom row appears with sublinks but...
4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
2
by: Robert W. | last post by:
I want to introduce a special "Admin" menu item into my WinForms app. It'll normally be hidden but activated by a special key-sequence. To make it more visible to a user (ex. while talking with a...
0
by: walter | last post by:
Hi there, I have two questions on the new asp.net menu control. 1. Is there a way , not by coding , but by declarative to change the menuitem image when it get selected? 2. We have multiple...
4
by: Bob Homes | last post by:
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to each menu item; that way, you could rest the cursor on the item (without actually running it) and then press F1 to get...
1
by: =?Utf-8?B?SmVmZiBUdQ==?= | last post by:
Hi, I'm using two menu controls. One is displayed at the top of the page. The other menu is displayed on the left side using a single site map. The top menu is for displaying level 1. The left...
1
by: bruce628 | last post by:
I want to use SWT Label and popmenu to construct a menubar ,and the effect of this menubar is same to the menubar in SWT.When click the Label,it should be highlighted and popmenu shows.The issue is...
18
by: Ste | last post by:
Hi there, I'm using CSS to highlight main navigation items in a 'suckerfish menu' for the currently loaded page, i.e. when on the home page, the 'home' navigation item should be highlighted. ...
5
by: sindhu | last post by:
Hello, I want to use Images as menu and menu items using javascript.The aim is that i have images with the menu items. when i click the image on that perticular mmenu item i want an image to be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
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,...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.