Take that same HTML, but use .nav-pills instead:
.nav-pills
Pills are also vertically stackable. Just add .nav-stacked.
.nav-stacked