<p>The <strong>navigation</strong> module seeks to remedy the problems of vertical and horizontal navigation design paradigms, by combining the two for a better presentational effect. HTML5 navigational elements are at the heart of the module, allowing you to quickly build your navigation without complicated structures and hacks.</p>
<p><small>All examples showcased refer to the mini-default flavor, some class names and styles might differ based on the flavor you're using.</small></p>
<p>Menus and navigation are some of the most important elements for any website or web app and their design and ease-of-use are key factors that can determine a page's bounce rates. The <strong>navigation</strong> module takes a step back from all the complicated menu and navigation design paradigms of the modern web, like dropdown menus and hamburger buttons, and tries to reinvent the basics for page navigation using HTML5 elements (i.e. <code>header</code>, <code>nav</code> and <code>footer</code>) and make navigation fully accessible for screen readers. Instead of sticking to either horizontal navigation menus (headers) or vertical menus (sidebars), we opted to allow the use of both for different things. Header menus are designed to stand out and contain links to help users find new content, whereas vertical navigation aims to provide a more traditional navigation menu that maps out your website's structure. Finally, footers are also part of the <strong>navigation</strong> module, as they can often provide the user with useful information and/or links that are very important to enhancing their experience.</p><br>
<p>To use the <strong>navigation</strong> module, simply include the link to the flavor you are using and start writing your HTML page as usual. One suggestion we will make is to add the following line inside your HTML page's <code><head></code> to utilize the viewport meta tag:</p><br>
<p>The <code><header></code> HTML element is used for a page's top horizontal navigation menu. It can contain a unique <code>.logo</code> element as its first child (this structure is not mandatory, but still recommended as a best practice), which can be either text (with or without a link) or an image. The rest of the elements inside the <code><header></code> must be <code><button></code>, <code><label class="button"></code> or <code><a class="button"></code> elements in order to be styled properly. Textual separators between those can be added using <code><span></code> elements.</p>
<li>The <code><header></code> element is partially responsive on smaller screen devices. More specifically, when the content inside it exceeds the width of the viewport (ie. overflows to the right), users will be able to scroll horizontally in order to see the rest of the menu.</li>
<li>The <code><header></code> element does not display as <codeclass="fore-tertiary">fixed</code> by default. You can, however, alter this CSS property manually, if you so desire.</li>
<pclass="do"><markclass="tertiary">Do:</mark> You can mix different elements styled like buttons inside a <code><header></code> element. In fact, we strongly recommend doing so, if you need to.</p>
<pclass="dont"><markclass="secondary">Don't:</mark> The <code>.logo</code> element should not be a <code><button></code> or a <code>.button</code> element. On the other hand, links and labels in the <code><header></code> should not be without a <code>.button</code> class. Ignoring this rule might cause unexpected behavior.</p>
<p>To add vertical navigation to your websites, use the <code><nav></code> HTML element. Adding links is pretty simple, just use <code><a></code> elements, no lists or anything else required. In order to add subcategories to your vertical navigation, use any normal textual element as the title of the subcategory and follow it with its links as normal, adding the <code>.sublink-1</code> class to them. Similarly, you can create a subcategory with a depth of 2, using a similar structure and the <code>.sublink-2</code> class.</p>
<li>Subcategories and their links support a depth of 2 by default. If, however, you need more than that, we recommend you check the <ahref="customization.html">customization page</a> for instructions on how to add more depth to the vertical navigation.</li>
<li>We strongly suggest you do not add irrelevant things inside your <code><nav></code> element, like images or text that are not part of the navigation menu.</li>
<pclass="do"><markclass="tertiary">Do:</mark> We strongly recommend using the <code><nav></code> element in combination with the <ahref="grid.html"><strong>grid</strong></a> module to make your layouts more responsive. For example, you could make your sidebar appear on the left side of your content in medium-sized and larger screens, but move to the very bottom of your content on smaller screens.</p>
<p>The <code><footer></code> element is used to create your page's footer. As normal, add the <code><footer></code> at or near the end of your <code><body></code> element and add content to it like you would otherwise.</p>
<p>If you want to learn more about <strong>mini.css</strong>'s modules, go back to the <ahref="modules.html">modules page</a> and choose another module to see its documentation.</p>
<footer><strong>mini.css</strong> was designed and built with <iclass="fa fa-heart-o"aria-hidden="true"></i> by <ahref="https://github.com/Chalarangelo">@Chalarangelo</a>. It is licensed under the <ahref="https://github.com/Chalarangelo/mini.css/blob/master/LICENSE">MIT License</a>. You can view the project's source code on <ahref="https://github.com/Chalarangelo/mini.css">Github</a>.</footer>