Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical Menu in Bootstrap

Is there a way to create a vertical menu (not dropdown, entirely separate vertical menu on sidebar) by using any bootstrap class? I can create one using my css, but just want to know if there is any builtin class for this in bootstrap, or can it be done using the top-bar with any hack?

like image 759
redGREENblue Avatar asked Dec 05 '11 07:12

redGREENblue


People also ask

How do I add a vertical navigation bar in Bootstrap?

Basic Navbar A standard navigation bar is created with the . navbar class, followed by a responsive collapsing class: . navbar-expand-xl|lg|md|sm (stacks the navbar vertically on extra large, large, medium or small screens). To add links inside the navbar, use a <ul> element with class="navbar-nav" .

How do I create a vertical navbar in Bootstrap 5?

Basic Navbarnavbar-expand-xxl|xl|lg|md|sm (stacks the navbar vertically on xxlarge, extra large, large, medium or small screens). To add links inside the navbar, use either an <ul> element (or a <div> ) with class="navbar-nav" . Then add <li> elements with a . nav-item class followed by an <a> element with a .

What is vertical menu?

All the content is visible Vertical menus allow you to list all of your website's pages along the side of the page, while in a horizontal menu many of the website's pages are hidden from view in drop down menus. This makes vertical menus easier for website navigation and a great option for long, single-page websites.


2 Answers

The question is old now.

But if somebody looks here the trick in the current version is to use the nav-stack class, like so:

<nav>   <ul class="nav nav-pills nav-stacked span2">     <li><a href="#">Home</a></li>     <li><a href="#">About</a></li>     <li><a href="#">Contact</a></li>   </ul> </nav> 
like image 188
hfogel Avatar answered Sep 20 '22 22:09

hfogel


The "nav nav-list" class of Twiter Bootstrap 2.0 is handy for building a side bar.

You can see a lot of documentation at http://www.w3resource.com/twitter-bootstrap/nav-tabs-and-pills-tutorial.php

like image 36
2 revs, 2 users 86% Avatar answered Sep 20 '22 22:09

2 revs, 2 users 86%