PDA

View Full Version : Horizontal Menu made from list



talanis
Jul 21st, 2009, 12:23 AM
Hi there,

I already have a pretty decent looking "normal" (vertical) menu based on a list


<ul>
<li><a id="haupta" href="../content/testa.php">Suche</a></li> <!-- Punkt 1 -->
<li><a class="ca n" href="#">Baby suchen</a></li>
<li><a class="ca n" href="#">Eltern suchen</a></li>
</ul>
<ul>
<li><a class="hauptb" href="../content/testb.php">Home</a></li> <!-- Punkt 1 -->
<li><a class="cb n" href="#">News</a></li>
<li><a class="cb n" href="#">Registrierung</a></li>
<li><a class="cb n" href="#">Neuigkeiten</a></li>
</ul>


that gets included on every page with a different menu tree open (testa.php includes the list in a div with the id "iA", testB.php includes it in a div with id="iB".
So the css look like this:


#ia #navigation A.ca,
#ib #navigation A.cb,
{

display: block;
}

#navigation A.n {
display: none;
}
#navigation A.n:hover {
display: block;
}


My question now is:
how does the css need to look to have the SAME menu list for a HORIZONTAL menu?
Display: inline for the <ul> makes a good horizontal start.
but how do i show the "sub-items" (class ca n, cb n) only on a hover ?


I hope i described my problem in a easy way.
Any help is appreciated!

_Aerospace_Eng_
Jul 21st, 2009, 12:41 AM
Can you post the rest of your HTML please?

DaiLaughing
Jul 21st, 2009, 09:34 AM
Try this:

Creating a drop down menu with CSS (http://www.yourwebskills.com/dropdownpractice.html)