css menu

S

Shawn Modersohn

I am new to html and css. I am trying to figure out how to make a
horizontal cascading menu with css. Netscape 7 won't hide the nested list
but IE6 will. I thought all I needed was display:none; Also with what works
in IE6 I can't figure out how to get the undisplayed list to show on hover?
What I got so far. Thanks for any help.

On an external style sheet

ul.main {
width:600px;
color: #C0C0C0;
list-style: none;
border: 2px solid #000000;
background-color: #008000;
}

ul.main li {
display:inline;
}


}
ul.main ul {
display: none;
list-style-type: none;
width: 100px;
border: 1px solid #000000;
}
ul.main ul > li a:hover{
display:block;
}
ul.main ul a:hover {
color:#FF0000;
}

ul.main a:hover{
color:#ffffff;
}

And for the body

<ul class="main">
<li><a href="http://webpages.charter.net/shawnmodersohn/tempurl.html">This
is
one</a>
<ul>
<li><a
href="http://webpages.charter.net/shawnmodersohn/tempurl.html">This
is one and a half</a>

<li><a
href="http://webpages.charter.net/shawnmodersohn/tempurl.html">One
point three 5</a>
</ul>

<li><a href="http://webpages.charter.net/shawnmodersohn/tempurl.html">This
is
two</a>
<li><a href="http://webpages.charter.net/shawnmodersohn/tempurl.html">This
is
three</a>
</ul>
 
S

Shawn Modersohn

damn I just caught the extra squigly, that lets netscape hide the nested
list, but the a: hover display is still a mystery.
 
O

ollimax

Shawn said:
I am new to html and css. I am trying to figure out how to make a
horizontal cascading menu with css. Netscape 7 won't hide the nested list
but IE6 will. I thought all I needed was display:none; Also with what works
in IE6 I can't figure out how to get the undisplayed list to show on hover?
What I got so far. Thanks for any help.

Hi.

There's a very good manual in http://www.alistapart.com/articles/dropdowns/

You need javascript only for IE, other browsers will do without. This is
because IE considers :hover only with <a> element, other browsers
consider it with almost any element.


Oll¡maX!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top