My goal was to design a vertical menu containing numerous sub navigation options, but due to the overwhelming number of sub nav items, it exceeds the size of the window. Setting overflow: auto;
and a specific height resolves this issue, however, the third level menu becomes hidden. I have explored various solutions involving scrolling navigation but have not yet found the perfect fit for my project.
Feel free to view the functioning code here: http://jsfiddle.net/PU9tr/
Below is the HTML structure:
<ul class="ver-menu">
<li><a href="#">Ver Menu- 1</a>
<ul class="sub-menu-1">
<li><a href="#">Ver sub Menu- 1</a>
<ul class="sub-menu-2">
<li><a href="#">Ver sub Menu- 1</a></li>
<li><a href="#">Ver sub Menu- 2</a></li>
<li><a href="#">Ver sub Menu- 3</a></li>
<li><a href="#">Ver sub Menu- 4</a></li>
</ul>
</li>
<li><a href="#">Ver sub Menu- 2</a>
<ul class="sub-menu-2">
<li><a href="#">Ver sub Menu- 1</a></li>
<li><a href="#">Ver sub Menu- 2</a></li>
<li><a href="#">Ver sub Menu- 3</a></li>
<li><a href="#">Ver sub Menu- 4</a></li>
</ul>
</li>
<li><a href="#">Ver sub Menu- 3</a></li>
<li><a href="#">Ver sub Menu- 4</a></li>
<li><a href="#">Ver sub Menu- 5</a></li>
<li><a href="#">Ver sub Menu- 6</a></li>
<li><a href="#">Ver sub Menu- 7</a></li>
<li><a href="#">Ver sub Menu- 8</a></li>
<li><a href="#">Ver sub Menu- 9</a></li>
<li><a href="#">Ver sub Menu- 10</a></li>
<li><a href="#">Ver sub Menu- 11</a></li>
<li><a href="#">Ver sub Menu- 12</a></li>
<li><a href="#">Ver sub Menu- 13</a></li>
<li><a href="#">Ver sub Menu- 14</a></li>
<li><a href="#">Ver sub Menu- 15</a></li>
<li><a href="#">Ver sub Menu- 16</a></li>
(... Additional sub-menu items ...)
</ul>
</li>
(Repeating structure for additional "Ver Menu" items...)
</ul>
And here's the corresponding CSS styling:
#page-wrap { width: 960px; margin: 25px auto; }
p { margin: 0 0 8px 0; }
a { text-decoration: none; }
img { vertical-align: middle; }
a img { border: 0; 180}
ul { list-style: none; }
h1 { margin: 0 0 10px 0; }
.ver-menu{ margin:0; padding:0; width: 200px}
(... Additional CSS rules ...)