Matthias Apsel: Frage zu vertikaler CSS-Navigation

Beitrag lesen

Om nah hoo pez nyeetz, Gunnar Bittersmann!

<nav>

>   <ol>
>     <li id="section1">
>       <a href="#section1">Section 1</a>
>       <ol>
>         <li><a href="?">Section 1.1</a></li>
>         <li><a href="?">Section 1.2</a></li>
>       </ol>
>     </li>
>     <li id="section2">
>       <a href="#section2">Section 2</a>
>       <ol>
>         <li><a href="?">Section 2.1</a></li>
>         <li><a href="?">Section 2.2</a></li>
>       </ol>
>     </li>
>   </ol>
> </nav>

nav li ol { display: none }

> nav li:target ol { display: block }

Und auch das nicht ordentlich, denn nach einem Klick auf Section 1.1 ist das :target nicht mehr bei Section 1 und somit das Menü wieder zugeklappt.

Matthias

--
1/z ist kein Blatt Papier. http://www.billiger-im-urlaub.de/kreis_sw.gif