Is it possible to create a multilevel menu using only CSS for the menu structure mentioned below? Websites like cssmenumaker.com showcase examples of menus with 2-3 level submenus by adding classes like has-submenu
.
Can we achieve this without adding any classes to the sub-menu and solely manage it through CSS?
For example:
.nav ul {}
.nav ul ul {}
.nav ul li{}....
<ul class="nav">
<li><a href="#">Home</a>
</li>
<li><a href="#">About Us</a>
</li>
<li><a href="#">News</a>
</li>
<li><a href="#">Gallery</a>
<ul>
<li><a href="#">Image Gallery</a>
</li>
<li><a href="#">Video Gallery</a>
</li>
</ul>
</li>
<li><a href="#">Contact</a>
</li>
</ul>
A demonstration on jsfiddle based on cssmenu.com can be found at: http://jsfiddle.net/zo61z9sw/
Visit for more information.
Alternatively, is it necessary to use jQuery or any other framework to handle multilevel menus?