Bootstrap Tutorial - Create button from anchor with icon








The following code shows how to create button from anchor with icon.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.8.3.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css">
<style type='text/css'>
i {<!--  www  .  j ava  2  s.c o  m-->
  position: relative;
  bottom: 2px;
}
</style>
</head>
<body style='margin:30px'>
  <div class="btn-group">
    <a class="btn" href="#"> 
       <i class="icon-plus"></i> <span>Add</span>
    </a> 
    <a class="btn" href="#"> 
       <i class="icon-trash"></i> <span>Remove</span>
    </a> 
    <a class="btn" href="#"> 
       <i class="icon-edit"></i> <span>Edit</span>
    </a>
  </div>
</body>
</html>

Click to view the demo