Hello everyone!
I am working on an existing project that is no longer maintained and want to remake the nav bar from a horisontal menu to a vertical. I am totally new to html and CSS since a couple of weeks now, so I’m learning new stuff every day.
So what I have to begin with is a menu.hbs with the top level menu items, and a couple of submenu-of-something.hbs with the submenu items for those top level items. If I was to make a new menu from scratch I would have just put all of the menu items in the same file. Admittedly there are quite a few though. What is the advantage to putting them in different ones?
I’m trying to make a side bar that extends the whole page height on the left side with sub menus spawning right underneath the item clicked. I don’t know how to do the positioning with this setup, the submenus just pop up below the entire top menu. I’m also not sure how I would do if I wanted a submenu of a submenu. Create a new layer of files or just add them to the existing one?
Here is the menu:
<nav id="fixed" class="bar">
<ul class="menu">
<li id="top" class="menu__item"><a href="/">Start</a></li>
<li id="top" class="menu__item"><a href="/colors.html">Colors</a></li>
<li id="top" class="menu__item"><a href="/buttons.html">Buttons</a></li>
<li id="top" class="menu__item"><a href="/images.html">Images</a></li>
</ul>
</nav>
And here is one of the submenus:
<nav id="fluid" class="bar">
<ul class="menu menu--sub">
<li class="menu__item"><a href="/images-logotype.html">Logotype</a></li>
<li class="menu__item"><a href="/images-photos.html">Photos</a></li>
</ul>
</nav>