473,395 Members | 1,484 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,395 software developers and data experts.

nav menu without using links

Gang,

I am trying to get a nav menu to perform a hover color change on
items, but seem to fail when using IE 6.x. I have included sample
code below to give an idea of what I am trying to accomplish:

<style>
..liHeader {
margin: 0px;
padding: 8px 0px 8px 5px;
background: #edf2f2;
font-weight: bold;
border-top: 1px solid #fff;
border-bottom: 1px solid #ddd;
border-left: 1px solid #fff;
border-right: 1px solid #ddd;
cursor: default;
}

#nav, #nav ul {
list-style: none;
margin: 0px;
padding: 0px;
font-size: 12px;
font-weight: normal;
color: #01518C;
cursor: default;
}

#nav li li {
display: block;
text-decoration: none;
margin: 0px;
background: #edf2f2;
border-top: 1px solid #fff;
border-bottom: 1px solid #ddd;
border-left: 1px solid #fff;
border-right: 1px solid #ddd;
cursor: default;
}
#nav li li { padding: 2px 8px 2px 30px; }
#nav li li:hover { background: #e0e9e9; }
</style>
<ul id="nav">
<li class="liHeader">Topic header 1</li>
<li>
<ul>
<li>submenu option 1</li>
<li>submenu option 2</li>
<li>submenu option 3</li>
</ul>
</li>
<li class="liHeader">Topic header 2</li>
<li>
<ul>
<li>submenu option 1</li>
<li>submenu option 2</li>
<li>submenu option 3</li>
</ul>
</li>
<li class="liHeader">Topic header 3</li>
<li>
<ul>
<li>submenu option 1</li>
<li>submenu option 2</li>
<li>submenu option 3</li>
</ul>
</li>
</ul>
As you can see there are nested ul's because I would like different
formatting to indicate "headers". I don't want to use "a" link's
because some of these options may have a cascading menu associated
with them, so a link would not work. I can get this to work just fine
in FF, but not IE. Does anyone have any suggestions?

Thanks,
Dave

Mar 13 '07 #1
5 1898
he******@yahoo.com wrote in news:1173754532.209313.9530
@q40g2000cwq.googlegroups.com:
>
As you can see there are nested ul's because I would like different
formatting to indicate "headers". I don't want to use "a" link's
because some of these options may have a cascading menu associated
with them, so a link would not work. I can get this to work just fine
in FF, but not IE. Does anyone have any suggestions?
'hover' only works on 'a' in IE. You might consider using a dead link
(link that goes nowhere) to get the effect to work.

--
Dirk
Mar 13 '07 #2
Scripsit Dirk:
'hover' only works on 'a' in IE.
:hover works only on _links_ (<awith href) on IE 6 but more or less by the
book (CSS spec) on IE 7.
You might consider using a dead link
(link that goes nowhere) to get the effect to work.
Well, the situation is probably already so messy and confusing to users that
some extra confusion would be suitable, along with the catastrophe theory
(the sooner you end up with something that even the authors sees as
catastrophic, the sooner there will be a fresh start). Dead links make
tabbing nasty, among other things.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Mar 13 '07 #3
"Jukka K. Korpela" <jk******@cs.tut.fiwrote in
news:vG******************@reader1.news.saunalahti. fi:
Scripsit Dirk:
>'hover' only works on 'a' in IE.

:hover works only on _links_ (<awith href) on IE 6 but more or less
:by the
book (CSS spec) on IE 7.
It does ? That's some improvement.
>You might consider using a dead link
(link that goes nowhere) to get the effect to work.

Well, the situation is probably already so messy and confusing to
users that some extra confusion would be suitable, along with the
catastrophe theory (the sooner you end up with something that even the
authors sees as catastrophic, the sooner there will be a fresh start).
Dead links make tabbing nasty, among other things.
LOL, thanks for adding to my first try of giving advice in this ng.
Never heard of the catastrophe theory, but it sure happened to me, and
probably will happen to me again. A lot of playing, trying and fiddling
before deciding that KISS (Keep It Simple Stupid) is just as good if not
better.

--
Dirk
Mar 13 '07 #4
On 13 Mar, 02:55, hende...@yahoo.com wrote:
I can get this to work just fine in FF, but not IE.
IE only supports :hover on <a>

So use an <a href="..." and set its width to 100%. You can use a
link href of "#" if you want. Just look around the web for CSS
nested menus, there are many examples of them.

Mar 13 '07 #5
On Mar 13, 6:49 am, "Andy Dingley" <ding...@codesmiths.comwrote:
On 13 Mar, 02:55, hende...@yahoo.com wrote:
I can get this to work just fine in FF, but not IE.

IE only supports :hover on <a>

So use an <a href="..." and set its width to 100%. You can use a
link href of "#" if you want. Just look around the web for CSS
nested menus, there are many examples of them.

Thanks for the advice guys. I kinda came to that conclusion from
trying various types of tags in the li's (eg spans, divs, labels, etc)
and non worked by the href's. I have put them back in and now have a
question if someone clicks them (on purpose or by accident). The ones
that are actually links to other pages will work as designed with the
"a href" tags, but what can I put in the href part for the ones that
are going to be used for menus. I tried putting the lb sign (#), but
that throws and error in IE. If I leave them blank, they change IE
into Windows Explorer (for local files). Any suggestions on this or
do I just have to use the lb sign and accept that IE will throw the
error?

Thanks,
Dave

Mar 13 '07 #6

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

Similar topics

1
by: Bizt | last post by:
Hi, I would like to create a menu where the menu options were taken from an XML file. The reason is that I would be able to update the xml file (by simply adding new child nodes) after I...
26
by: Thomas Mlynarczyk | last post by:
Hi, Could some kind person using Mac or Linux (or others) please take a look at http://www.mlynarczyk-webdesign.de/tmp/menu/menu.html and tell me if the page renders as it should (screenshot...
10
by: Richard | last post by:
The style sheet shown below is from the suckerfish vertical menu. http://www.htmldog.com/articles/suckerfish/dropdowns/example/vertical.html I've added in a few minor changes to color code the...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
2
by: pantagruel | last post by:
I have an old web application I did where browsers with dynamic capabilities received a drop down menu on the top of the page and a fold out on the left hand side of the page and non-dynamic...
4
by: snowweb | last post by:
I am trying to implement a CSS hierarchical unfolding menu on a site. The thing is, it needs to be dynamically populated from the results of a database query. I previously had the menu working but...
1
by: DJG79 | last post by:
Hi all, I am using an open source menu that i found and it works great, except for one thing that when the web page is not scrolled to the very top the drop down links will not stay visible. Has...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
2
by: camelot | last post by:
Hello, I've got a problem and I hope someone could help me. I have a page that contains frames. Below a piece of code: .... <FRAMESET COLS="120,*"> <FRAME NAME="menu" SRC="menu.html" > <FRAME...
5
by: AG | last post by:
I realize that the obvious suggestion would be malware, but my definitions are up to date and I have already scanned for it. I have also tried disabling all IE add-ons. I just rebuilt and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.