Create icon button dropdown

Description

The following code shows how to create icon button dropdown.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.10.1.js'></script>
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">
<style type='text/css'>
.navbar-fixed-top .btn-group-merge {
  margin-left: -5px;
}<!--from  w ww .  java  2 s  . co  m-->

.navbar-fixed-top .btn-group-merge:first-child {
  margin-left: 0;
}

.navbar-fixed-top .btn-group-merge .btn {
  border-radius: 0 4px 4px 0;
}

.navbar-fixed-top .btn-group-merge:first-child .btn {
  border-radius: 4px 0 0 4px;
}
</style>
</head>
<body>
  <div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <div class="pull-left">
          <div class="btn-group btn-group-merge">
            <a class="btn" href="#" data-toggle="dropdown">
            <i class="icon icon-certificate"></i></a>
            <ul class="dropdown-menu">
              <li><a href="#">One</a></li>
              <li><a href="#">Two</a></li>
              <li><a href="#">Three</a></li>
            </ul>
          </div>
          <div class="btn-group btn-group-merge">
            <a class="btn" href="#" data-toggle="dropdown">
            <i class="icon icon-comment"></i></a>
            <ul class="dropdown-menu">
              <li><a href="#">A</a></li>
              <li><a href="#">B</a></li>
              <li><a href="#">C</a></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>
</html>

Click to view the demo





















Home »
  Bootstrap »
    Example »




Accordion
Alert
Auto Complete
Badge
Breadcrum
Button
Carousel
Collapse
Dialog
Dropdown
Form
Icon
Jumbotron
Label
Layout
List
List Group
Media
Navigation Bar
Pager
Page Header
Panel
Paragraph
Pills
Popover
ProgressBar
ScrollSpy
Switch
Tab
Table
Thumnail
Tooltip
Tree
Well