The following code shows how to create vertical button groups.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-git2.js'></script>
<link rel="stylesheet" type="text/css"
href="http://getbootstrap.com/assets/css/docs.css">
<link rel="stylesheet" type="text/css"
href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
<script type='text/javascript'
src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
</head><!-- w w w . ja v a2 s. c o m-->
<body style='margin:30px'>
<h3 id="btn-groups-vertical">Vertical button groups</h3>
<div class="btn-group-vertical">
<button class="btn btn-success" type="button">1</button>
<button class="btn btn-default" type="button">2</button>
<button class="btn btn-warning" type="button">3</button>
<button class="btn btn-primary" type="button">4</button>
</div>
</body>
</html>